Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Help with drop down lists..

Avatar

Level 1

I am currently trying designing a new order form for my company.  I am using drop down lists with entries 1 - 10 to allow the user to enter quantities of the products that they wish to order.  Each product costs the same.  Is there a way i can generate a total cost, displayed at the bottom of the form after the form has been filled by the user based on the drop down list selections?

Thanks for any help

Ryan

1 Reply

Avatar

Level 10

Hi Ryan,

This is very possible.

There are several good examples that come with LC Designer. When you click new, select "based on a template". Have a look at the purchase order template.

In your dropdowns go to the Object / Binding tab and select "specify values", check that these match your dropdowns, 1, 2, 3,... etc. Then you can refer to the dropdowns in your calculations. In javascript:

subtotal.rawValue = price.rawValue * quantity.rawValue // the dropdown is named quantity

Good luck,

Niall