Page 1 of 1
Conditionally show value in dropdown
Posted: 27 Feb 2018
by vegard.grutle
Hi!
I have a value in a dropdown which should only be visible based on a selected value in another dropdown.
How can i achieve this?
Re: Conditionally show value in dropdown
Posted: 27 Feb 2018
by Nikita Kurguzov
Dear vegard,
Please, check out this topic here and let me know if you have any questions for your situation in particular -
viewtopic.php?f=1&t=1205
Would love to help and make sure that everything works for you as expected.
Re: Conditionally show value in dropdown
Posted: 28 Feb 2018
by vegard.grutle
Hi,
This script will only hide a value in a drop down as i understand. It is not dependent. In my case i have two lookup lists. If i select value X in the first lookup then value Y shall be hided/removed in the second lookup.
Re: Conditionally show value in dropdown
Posted: 28 Feb 2018
by Nikita Kurguzov
Dear vegard,
Please refer to our documentation on getting and setting field data to handle change -
https://spform.com/javascript-framework ... eld-values
You'll need to use something like this:
Code: Select all
fd.field('Choice1').change(function(){
if(fd.field('Choice1').value() == 'Test'){
//hide option in second choice field
}
else {
//show option in second choice field
}
});
Re: Conditionally show value in dropdown
Posted: 02 Mar 2018
by vegard.grutle
Well received.
Thanks!