# How to calculate price of products?

• ArtofRecycle
Asked on December 25, 2017 at 01:37 AM

Dear Fabulous Tech Person,

I am creating a form that teachers can input the free supplies they receive, but we need to calculate the value of the various items they are getting. They will be filling the form out on site as they do their shopping in person.

Say a teacher gets 1 stapler, 2 packs of rubberbands, 25 books and 2 board games.

We value the stapler at .50, the rubberbands at .25 each, the books at \$.50 each and the board games at \$1.50 each.

We need to have a total value of the items we gave them to track for program impact. e.g. the total somewhere in the form should give us a value of \$16.50

I have attempted to make various categories Office Supplies, Art Supplies, Containers, etc. to make it easier for teachers to navagate the form.

I have inserted multi-line questions with dropdown choices and a number box next to the dropdown in the hopes that I could create conditional logic that states IF: Office Supplies STATES: Rubber Bands THEN: multiply value (in atttached number box [2] in this case)by .25 and OUTPUT: in a hidden field somewhere

My Question. Can I make a number input relate to a specific choice in a dropdown menus for this? or if not can I make multiple items on one page so that they don't have to push "next" 150 times to get to the end of the form to submit it?

I tried the slider widget (at the end of the form and it may be forced to do the job, but I feel it is a bit clumsy and wanted something more user friendly. Because we allow some unconventional measurments to allow them to estimate, such as handfulls of popsicle sticks, and I would like the number inputs to be able to reflect such quantifers.

Sincerely,

Mr. Nobody Special

Art of Recycle

A non-profit community art center

• Nik_C
Answered on December 25, 2017 at 03:41 AM

Unfortunately, that cannot work in multiline field:

Since you cannot set conditions in that field for each field separately.

What you can do is to insert the regular drop-down field, assign calculation values (which will be the price of the product).

Then you can calculate the total price by using conditions:

Could that work for you?

Thank you!