- thyrocareAsked on August 01, 2014 at 12:30 AM
I want to give an Validation for no duplicates in two different Dropdown option related form (survey)
There are 2 dropdowns and Each Containing same options such as
and If i select father / Mother it should not repeat in another field / dropdown options, (it should Hide automatically)
But i dont want to add more fields.
- JotForm SupportjonathanAnswered on August 01, 2014 at 06:00 AM
- thyrocareAnswered on August 01, 2014 at 07:11 AM
Can You do it for me? for the form.
- thyrocareAnswered on August 01, 2014 at 07:26 AM
Or is there any Other option to Validate on submit?
- jedcadornaAnswered on August 01, 2014 at 09:07 AM
This is only possible using form source. We'll try to make a sample and let you know via this thread once done.
- jedcadornaAnswered on August 02, 2014 at 06:15 AM
Sorry for the late response. You can view the sample form in this link. Like what you've requested the validation will not duplicate selected option for 2 dropdowns like what you mention above.
Let us know the form from which the script will be applied so we can help you.
- thyrocareAnswered on August 02, 2014 at 06:31 AM
Let me know how can i do it ? and also want to do it only for first three Options such as no same for Spouse, father and Mother.
but i can select as many brother, sister, son and daughter.
- jedcadornaAnswered on August 02, 2014 at 07:41 AM
I have updated the code that only disable's Spouse,Father and Mother and the rest can be selected twice.
It would be best if you have a finished form already but if you want to know how to apply this code by yourself then you can follow the instruction below.
1. Here is the script that will be used http://pastie.org/9438884.
2. Once you download your forms source edit it using notepad or some other editors, I use notepad++.
3. Since the code is written in jquery language you need to add this line of code <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> somewhere inside the <head> </head> tag. I suggest to place it beside the other <script> </script> tags as well.
4. Paste the code that I provided above below before the </body> ends.
5. Now there are 2 values that you need to replace to make this. Since we are using 2 dropdown fields we need to get the ID's of those dropdowns.
6. Once you have identified the ID's of each drop downs then let's replace the value in the script that I've provided earlier.
Let us know if you need help.
- thyrocareAnswered on August 02, 2014 at 08:26 AM
Is there any short cut thing to do it in Form....
- JotForm SupportWelvinAnswered on August 02, 2014 at 11:54 AM
I'm afraid that you can't do it in the form. It needs to be added to the form source codes. We can help you to implement the whole codes to your form. But we advise finishing your form first so everything will be final - to avoid going back and making additional changes.
An alternative would be using our Dynamic Dropdown Widget: http://widgets.jotform.com/widget/dynamic_dropdowns. Example Form: http://www.jotformpro.com/form/42134587102953