These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

calculation or own text?

kmay
Registered: Mar 18 2010
Posts: 18

Hi

I'm trying to finish off an Order Confirmation form and I'm stuck on one last calculation.

When the user selects a model type from a drop down box, depending on the currency selected elsewhere, I want the 'unit price' to automatically appear, this is the code I've used:

if (this.getField("Currency").value == "USD $" && this.getField("MODEL1").value == "Top Model"){event.value="650"};
 
if(event.value == "$0.00") event.value = '';

however, sometimes we give discounts and we want that reflected in the unit price, not as a separate discount text field - so I need the user to be able to fill that box in with a different number if this is the case

I currently can't make it do that - it always just gets overwritten with the '650'

any ideas?

Thanks

My Product Information:
Acrobat Pro Extended 9.0, Windows
jimhealy
Team
Registered: Jan 2 2006
Posts: 146
I don't think you have enough info here. If this is all of the code in the calculated field, then the only possible values would be the empty string and 650.

Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com

kmay
Registered: Mar 18 2010
Posts: 18
Yeah, that is what I'm getting - and this is the extent of my simple piece of code - I'm wondering is there a code snippet I can add in that lets the user enter their own information?