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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans