Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Hide Specific Lookup Column Field Values

$
0
0

Hello SharePoint Fam,

I am needing to hide 15 options from a lookup dropdown field that is linked to a custom list.  I could easily just remove the values form the lookup column list but that would sort of break the list so I am wondering if there is some type of code that can be used to hide specific values in the lookup dropwndown?

I tried the following but no luck:

<script src="https://code.jquery.com/jquery-1.12.4.js" type="text/javascript"></script> <script type="text/javascript">
$(document).ready( function() {
  $(":input[title='RoomName']").find("option").hide();
// hide the lookup value which id is 1 and 2
  $(":input[title='RoomName']").find("option[value='1']").show();
  $(":input[title='RoomName']").find("option[value='2']").show();
});</script>

Thanks N Advance



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>