Buy Now
Sign in

How to disable single option in dropdown according to another field

M.Abletech , June 07 at 06:40
M
M.Abletech
Hi,
I have two dropbox setting values: I wish that if in the first dropdown I choose option 3, in secondo dropdown option 1 is disable. if in the first dropdown I choose option 5, in secondo dropdown option 1 and 2 are disable.
This is just an example.
I've read this post:
https://www.chronoengine.com/forums/posts/t103651/how-to-make-in-dropdown-a-single-option-value-disabled-visible-but-non-active.html
Where admin suggested :
jQuery(document).ready(function($){$('option[value="xyz"]').prop("disabled", true);});
But where exacly do I need to put this code?
And how and where can I recall it?
Thank you a lot!
GreyHead
Hi M.Abletech,
That would go in a JavaScript action. By itself it will not do what you need but the code can be expanded to change option properties in the second dropdown when the first one is changed.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much