Conditionally show value in dropdown

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
vegard.grutle
Posts: 59
Joined: Fri Mar 17, 2017

27 Feb 2018

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?

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

27 Feb 2018

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.
Cheers

User avatar
vegard.grutle
Posts: 59
Joined: Fri Mar 17, 2017

28 Feb 2018

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.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

28 Feb 2018

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
  }
});
Cheers

User avatar
vegard.grutle
Posts: 59
Joined: Fri Mar 17, 2017

02 Mar 2018

Well received.

Thanks!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests