none
Disable multi-selection lookup column using jQuery/JavaScript RRS feed

  • Question

  • Hi,

    I have a lookup column ( multiple item selection ). I would like to disable the control in Edit form.aspx.

    How to achieve this using jQuery/ Javascript?

    Thanks

    Monday, April 24, 2017 11:28 AM

All replies

  • Hi,

    Please modify the "MultipleLookup" to your field name in code below, then add it to script editor web part into editform.aspx page.

    <script src="//code.jquery.com/jquery-3.1.0.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    	var html='<input disabled="" class="ms-ButtonHeightWidth" id="AddButton" type="button" value="Add >"><br><br><input disabled="" class="ms-ButtonHeightWidth" id="RemoveButton" type="button" value="< Remove">';
    	$("table[id^='MultipleLookup'] .ms-input.ms-noWrap").html(html);
    });
    </script>

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, April 27, 2017 7:21 AM
    Moderator
  • Hi,

    Any update?

    If my reply helps you, please mark the reply as answer, it will make others who stuck with the similar issue easier to search for valid solutions in this forum.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, May 4, 2017 5:26 AM
    Moderator