I found another thread here with exactly what I'd like to do: Hide a field based on the value of another field. If WorkspaceSetup= NO, LaptopSetup field is hidden. The other thread is here (I can't comment because I don't have enough reputation points yet)

Hide/Show field on list form based on value from another field

I can't seem to get this to work. I'm also a little confused on what the 2nd commenter means as far as the on.change event. This is how I changed the code to reflect my fields:

enter image description here

1 Answer 1


Make sure below point before using SPUtility.js.

It currently will NOT work with:

  • External list forms
  • Forms that have been customized using Infopath
  • Sites with Minimal Download Strategy enabled (feature resides in Manage Site features)

Try below code:

<script src="/Shared%20Documents/jquery-1.10.2.min.js"></script> //Edit your correct path
<script src="/Shared%20Documents/sputility.min.js"></script> //Edit your correct path

// wait for the window to load
$(document).ready(function () {

    var WorskspaceSetupField = SPUtility.GetSPField('WorkspaceSetup');

    var showOrHideField = function() {
        var workspaceSetupFieldValue = WorskspaceSetupField.GetValue();

        if(workspaceSetupFieldValue  == 'No') {
        else {

    // run at startup (for edit form)

    // make sure if the user changes the value we handle it
    $(WorskspaceSetupField.Dropdown).on('change', showOrHideField);
  • Thank you, Dikesh. I do have this on an InfoPath for so I guess that explains why it will not work. At least I know that now. I appreciate the info.
    – markasey
    May 20, 2016 at 16:23
  • If this is helpful then please mark my answer and upvote as well :) May 21, 2016 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.