Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How can I allow a customer to enter an amount in a box and subtract it from a total

Avatar

Level 1
I'm new to lifecycle so I need some help. I figured out how to create the form I wanted but there is one thing I am stuck on and I know someone knows how to do this. It's probably so easy but I am stuck. If you go to the form I created you will see three drop down menus. If you just make a selection you will see the total show up in the "total package cost" box. I want to be able to manually enter a "discount" and then have that subtracted from the total. The script for the "Total Package Cost" is this.rawValue = NumericField1.rawValue+NumericField2.rawValue+NumericField3.rawValue. The "Discount" box is NumericField5. What should I do allow me to enter a number in the discount field and have it automatically subtract from the total field? I hope that's no too confusing. The file in question is at http://www.premierweddings.tv/contractform2010.pdf
1 Reply

Avatar

Former Community Member
Marc,



Modify the Total Package Cost script to subtract the discount.



this.rawValue = NumericField1.rawValue + NumericField2.rawValue + NumericField3.rawValue - NumericField5.rawValue;



Steve