web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Hide/Show options in O...
Power Pages
Answered

Hide/Show options in Option Set fields

(0) ShareShare
ReportReport
Posted on by 62

Hi All,

 

I have a two option set fields on a web form step.

Based on selection of first option set I need to hide/show options in the second option set field.

How can i achieve this bu JQuey (Hide/Show options in Option Set field)

 

Thank you.

Categories:
I have the same question (0)
  • Verified answer
    oliver.rodrigues Profile Picture
    9,471 Most Valuable Professional on at

    Hi, to hide an option you can use the following via JQuery:

     

    $("#<attribute name> option[value='< option set value>']").hide();

    for example:

    $("#new_myoption option[value='123123']").hide();
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    H V Profile Picture
    1,510 on at

    Hi @SunilR 

    Can you add below code in Web Page/Web Form javascript section:

    $(document).ready(function(){
    	$("#new_firstoptionsetfieldlogicalname").change(function () {
     // Get value of your trigger field
     let currentVal = $("#new_firstoptionsetfieldlogicalname option:selected").val();
    
     //do some validation
     if(currentVal == "459490001") {
     $("#new_secondoptionsetfield option[value='123123']").hide();
     } else {
     $("#new_secondoptionsetfield option[value='123123']").show();
     }
     });
     });

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 59

#2
11manish Profile Picture

11manish 53

#3
Vish WR Profile Picture

Vish WR 29

Last 30 days Overall leaderboard