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