Hide a value in dropdown list (Lookup column)

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

02 May 2018

Hi!

I need to hide a value in a dropdown list (Lookup column). How can i achieve this in a quick maner?

Thanks!

Vegard

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

02 May 2018

Dear Vegard,
If you are using regular Lookup and not Cross-site Lookup, the following code should work, just replace value with the ID of the item you want to hide:

Code: Select all

fd.field('Lookup').control()._el().find('select option[value=1]').hide();
Cheers

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

02 May 2018

Hi, Nikita

Did the trick changing .Hide(); to .remove();.

Many thanks!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests