- consumerscoverageAsked on May 13, 2012 at 09:05 PM
How do I set the value of a hidden field with conditions?
Ideally, I would like to set the hidden field to a percentage of a value.
However, since there doesn't seem to be an easy way to do math other than addition on forms,
and I have only a few items, I would like to set a hidden field depending on what item a customer has chosen.
For example if a customer chooses an item costing $100.00 I would like to set a net field to $90.00. I don't want it be visible on a form like a discount code. Also I would like to keep hosting the form on jotforms so that I can easily modify the form if necessary rather than copying the source to my web site and modifying the html.
- JotForm SupportjonathanAnswered on May 13, 2012 at 10:54 PM
It seems we cannot do this using JotForm builder alone. It really needs an outside influence of another code or function. Just as you have mentioned, it will require modification of the source in your own website.
Unfortunatelly, the form does not have the capability to transfer data/value from one field to another field. Or it could not compute values also, except those in the Payment tools(which only totals them).
The hidden fields can only have the value that you set during design, and it cannot be change by Condition logic on the form alone.
If you are going to use the Condition logic to show/hide to the customer a value/total base on the chosen item, you can do this by using the condition to Show/Hide a fixed values on a text field.
Since you mentioned, you only have few items, then this can be doable. You will just have to make condition for each of the item (i.e. Item 1 chosen, then show value 1)
I hope I provided a helpful insight on this. Please inform us if you have further inquiry.