You can use this code as the custom calculation script for Fee:
var parking = this.getField("Parking").valueAsString;
if (parking=="Couple") event.value = 150;
else event.value = 125;
I must be doing something wrong.
For practice I created a form in Acrobat Pro XI that has just two fields.
"parking" field created with a drop down box. Only two options, with default option set to "Couple" and other possible selection is"Single".
Second field created as text field and named "fee". After creating "fee" field I right click and go to Properties and then to Calculate. I drop the suggested script into the Custom calculation script box.
Save the form and open in Acrobat Reader. No matter weather I choose "Couple" or change it to "Single" and then tab to the "fee" field, nothing happens in the "fee" field. It remains blank.
So again I say I am a true novice at this and appreciate the help already given and any further advice you might have.
JS is case-sensitive. The name of your field is "parking", not "Parking" as it appears in the script. This would cause the script to fail.
Thanks for your help. That was exactly it. Hopefully I can learn by this example to do other things. Thanks again.
One last question. How do I skip a field that has been calculated and does not require any input by the user.
As in the example above the "fee" is calculated. How can I just skip that field?
Thank you again.
Set it as reas-only.