Expand my Community achievements bar.

Order Form with dropdown menu PLEASE HELP!

Avatar

Level 1
I am very new to lifecycle and I need some help. I am trying to create a form where my client can select an option from a dropdown menu. Then the value of that option shows up in a new text box. Then the value in the text box gets added to the value of another dropdown menu. Here's a basic flow chart.



Dropdown Menu with items (i.e. 8x10 photo) ------>Price shows up in new text box (i.e. $8.00) --------->New Text Box which shows total amount.



I don't need an option for quantity. I just need to make several dropdown menus and then have the total cost show in a new box. I hope this makes sense. If anyone can help I would appreciate it.
1 Reply

Avatar

Former Community Member
Hi Marc

Option for quantity wouldn't be any problem. ^^



Okey here you go, first make a "Dropdown-Menue"

Add the options you wanna give with the green button.



Then go to bind/binding; click the checkbox there.

Now get a decimal field in your form. (Name probably "Decimalfield1")

Click the dropdownlist. There should be some kind of table where you can enter a script. First choose "Exit" and "JavaScript".

Then you should write in there something like



if (this.rawValue == "1")

{decimalfield1.rawValue = "3,00"}

if (this.rawValue == "2")

{decimalfield1.rawValue = "4,00"}



Be sure to use the right names ;D

Do that with all your boxes.



The last box with the sum:

Get in there, choose "Calculate" (FORMCALC)

Write in decimalfield1 + decimalfield2 + (and so on)



To make the dollar sign and so show up you've got to give a pattern in each field :)



Hope that helped :)



Lisa