What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How set value in dropdown field based on another selection?Asked by bdoodle on November 04, 2016 at 11:49 AM
I have 42 dropdown boxes which allow a customer to select the color for each of the 42 panels of a spinnaker sail. I also want the customer to be able to change the color of all panels currently in one color to another selected color. For example, the customer might want to change all panels in his spinnaker design that are currently royal blue to be aqua instead. Can you think of a way to do that given the constraints of dropdown fields?
Please note that I have created a pair of dropdown fields to capture the customer's desire to go from color 1 to color 2, but I realize I can't use the fields as I hoped based on some experimentation and reading in your forum.
Can you think of some creative way to do what I want? It's very important to the success of this form.
Form in test mode = :
If I understood you correctly you want to allow your users to change color in all 42 dropdown panels based on color that is selected in "Change all panels in this color".
You can achieve this with conditional logic Update / Calculate Field.
I have made a demo form from your cloned form for Panel 1a.
Here is my demo form:
You will need to create same conditions for all other fields.
Hope this will help. Let us know if you need further assistance.
Thanks for your response. I guess I didn't make my question clear enough.
Imagine that colors have already been selected in Panels 1a thru 21b, half of them red and half of them Royal Blue.
I want to allow the customer to enter Royal Blue as the dropdown color in "Change all panels in this color" and Aqua as the dropdown color in "To this color". Then I want the form to change every panel that has Royal Blue selected to Aqua.
i.e. If "Change all panels in this color" and "To this color" are both filled, AND
If the color in panel 1a = the color in "Change all panels in this color"
insert the color in "To this color" into Panel 1a
Repeat above logic for all 42 panels.
What I can't do is compare the color in Panel 1a to the color in "Change all panels in this color." I don't appear to be able to compare the selected value in a dropdown box to any other field's value.
Perhaps there is some way I could use calc values in each dropdown?
Thank you for providing us additional information. Now I understand what you are trying to achieve.
Unfortunately I think that this is not possible to achieve. I made some test, but I was not able compare the colors.
I will do some more tests and I will let you know if I find solution for your request.
Hello,I managed to find a complicated solution. I shouldn't have to jump thru the hoops I do (see below). One should be able to compare the value in a dropdown box to the value in another field including another dropdown box. I urge you to add this functionality to your developers' "To Do" list.
What I am doing to circumvent the problem:
1.) Create a calc field into which I insert the value in "Change all panels in this color" dropdown box.
2.) Create a calc field for each of my 42 spinnaker panels into which I insert the value from each panel's dropdown box.
3.) Using" position: absolute values and z-index: -100", put the above 43 fields behind another field (a comment box) so they don't appear on the form. I can't hide the fields because I need to use them in condition statements.
4.) Add 1 condition statement (for each of my 42 spinnaker panels) as follows:
If the value in "Change all panels in this color" dropdown box is not None AND
the value in "To this color" is not None AND
the value the calc field #1 above = the value in the calc field #2 above
then insert the value in the "To this color" dropdown box into Panel 1a dropdown box
NOTE: I'm leaving out some logic that doesn't pertain to the need to overcome the fact that you cannot compare the value in a dropdown box to anything but one of its optional values.
At any rate, I need no other assistance at the moment.
Thanks for looking into the problem, and please add this request to the developers' list.
Thank you for sharing to us a detailed explanation of the resolution you had.
I will now forward a request feature ticket base on your explanation of the requirement on this thread https://www.jotform.com/answers/983421