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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Show/hide set of text field based on drop down values selection on the power apps portal form

(1) ShareShare
ReportReport
Posted on by 100
Hello,
 
i want to show/hide set of text fields based on drop-down value selection. lets say, in the drop down i will have values like 2,3,4 so on. when they select 2 then only other related two text fields should display not others, Similar way when they select 3 then only related set of text fields will display to enter values. is that possible?
 
Thanks
I have the same question (0)
  • Verified answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    You can add custom JavaScript to the Portal Basic form to fulfill the requirements.
     

    In portal management: 

    1. Under content > Basic forms > Select your desired form > Additional settings 

    2. Scroll down until you see the JavaScript section.

     

    3. Then add the following jQuery

     

    $(document).ready(function() {
            $("#cr95c_customchoice").change(function(){
       
                //Gets the text value of the selected option.
                var selectedOption = $("#cr95c_customchoice")[0].selectedOptions[0].innerHTML;
       
                //Gets the input field named Name.
                var name = $("#cr95c_name");
       
                //When the selected option is Choice 4, the Name field is hidden.
                if(selectedOption === "Choice 4"){
                    name.hide();
                }else{
                    name.show();
                }
            })
        });

     

     

    Here is a related link you can refer to.

    https://www.spyglassmtg.com/blog/power-apps-portal-advanced-forms-web-forms-and-custom-javascript

     

    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     

     

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 Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 174

#2
ManoVerse Profile Picture

ManoVerse 54 Super User 2026 Season 1

#3
Niki Patel Profile Picture

Niki Patel 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans