The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Dropdown Hidden Value

Labels

This Discussion is public

Notifications

I have a tricky situation that I'm trying to solve on a calculator form. I'd like to create different math based on what is selected from a dropdown. Example:

[dropdown select options]
CHOCOLATE (hidden value of 4)
VANILLA (hidden value of 3)
CHERRY (hidden value of 2)

Does anyone know if it's possible to make different dropdown options hold a numerical value? I need different values to hold a different number value so that if they select chocolate, the calculator I'm using knows that means they get 4 items. It's a number based on weight, which is why I need to determine what flavor is selected. Kind of a weird request but I'm struggling figuring out how to do this with Formidable unless I just custom code an entire form with javascript and if/else statements. Any suggestions would be appreciated!

Just select "use separate values" for the dropdown. You can make the values anything you want.

Formidable requires the separate values to be different from each other, though. I know I have different "flavors" that will have the same numerical value and it won't allow for duplicates. It seems that this is used more for labeling then actually putting a numerical value to be used for math calculations. But maybe I'm missing something?

If you use the bulk editor, you can save same values.

Victor, you are right. I was able to bulk edit. Thanks

The big question is how do you reference that separate field for doing math calculations? I know if my dropdown field id is 350, I can use that value to display a value (like 20 * [350]). I couldn't find any documentation on whether the numerical value from a separate field can be used for calculations.

Truthfully, if I were doing this, I would do the calculation in jQuery. I've never liked Formidable's way of doing calculations. Some of the forms I've had to build in the past have highly complex calculations. I just automatically go to jQuery now and don't bother with Formidable's calculations. Same holds true for real time field validation.

In case anyone else references this post later on, just using the dropdown field's ID WILL work for doing math calculations if you put a number in the separate field. I'm surprised it worked, but it works so I'm just glad.

Victor, thanks for your input!

Discussion closed.