Thank you so much for the quick reply! That is close to what I want, but it is not the "abc" that needs to change based on the Special Instructions, it is the "123" or "456" The "abc" is always the same and always needs to change to the name of the picture.
Example: we sell our pictures. each picture is a different size ratio. the prices depend on the size ratio.
The choices are different for each one. We pass those values to PayPal.
When we upload the pictures to the site, the IPTC field "Special Instruction" contains the picture size ratio. So if the picture is a 4x6 ratio, Special instructions will say 4x6. If the picture is 5x7 ratio, Special Instructions will say 5x7.
Now I have to edit images and manually insert the correct code to pass to PayPal. I have an additional field that is named "paypal". If the IPTC Special Instructions say 5x7, I copy and paste the correct code for 5x7.
All paypal codes for all sizes have the words "SOME COOL PICTURE" for the name of the picture.
After I paste in all the correct codes for all the correct pictures, I go to MySql and batch change "SOME COOL PICTURE" for the actual picture name.
You will understand why the the additional field "PayPal" needs to have the html form code in it and why it does not work in the template file instead. And really, setting up the paypal code there works elegantly with no problems. (the actual values are in a javascript code in header.html ) Of course {image_paypal} is on the details.html page.
Does that clarify my intent?
I think it will be the same as inserting other iptc values, except that it should probably say:
IF iptc_special_instructions="4x6" then insert {<form 4x6 gobbledygook code name="SOME COOL PICTURE" </form>}
ELSE IF iptc_special_instructions="5x7" then insert {<form 5x7 gobbledygook code name="SOME COOL PICTURE" </form>}
ELSE IF iptc_special_instructions="8x10" then insert {<form 8x10 gobbledygook code name="SOME COOL PICTURE" </form>}
and so on
Then, after all the code is in the PayPal field, we need to change SOME COOL PICTURE to the real name of the picture.
So, from my first example the 123 or 456 represents the picture size. the abc is just the picture name.
Does it make sense now? I know it can all be done in checkimages.php, I'm just not that great at the correct syntax.
Thanks again for all your help!