JS Solution

Forums General discussion JS Solution

This topic contains 2 replies, has 2 voices, and was last updated by  Kristina Amador 5 days, 7 hours ago.

  • Author
    Posts
  • #22430

    Kristina Amador
    Participant

    I am seeking a JS solution that will allow me to hide select (SPFieldChoice/radio button) options with JavaScript? (Cross browser). Please and thank you.

  • #22466

    Alexander Bautz
    Keymaster

    You can use something like this:

    // Hide option number 2 from the top (list is 0-indexed)
    jQuery("#dffs_ChoiceColumn2").find(".ms-RadioText:eq(1)").hide();
    // Show option number 2 from the top (list is 0-indexed)
    jQuery("#dffs_ChoiceColumn2").find(".ms-RadioText:eq(1)").show();

    Replace “ChoiceColumn2” with your fields internal name.

    Hope this gets you on track,
    Alexander

  • #22522

    Kristina Amador
    Participant

    Worked like a charm! Thank you so much Alex!

    -KMA

You must be logged in to reply to this topic.