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 Apps / How to hide forms base...
Power Apps
Answered

How to hide forms based on radio button?

(0) ShareShare
ReportReport
Posted on by 145

Hi , 

 

I have 3 radio fields - Radio1, Radio2 , Radio 3 with YES/NO options.

I have 3 forms in one screen  - Forms1, Forms2 , Forms3.

 

IF Radio1.value = YES  , Form1. visible = TRUE else FALSE.

similarly for 2 & 3.

 

I am not able to implement, can someone help 

 

 

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @ssvk,

    You should use one Radio control with 3 choices in the items property [Forms1,Forms2,Forms3] or a more descriptive name for your forms. Make the Visible property of Form1 - Radio1.Selected.Value=Forms1

    Visibility property of Form2=Radio1.Selected.Value=Forms2, etc by using one radio control you will prevent more than 1 form from being Visible at the same time.

  • ssvk Profile Picture
    145 on at

    Hi @Drrickryp,

     

    Thanks for your response, 

    I somwhow have a different problem statement where I have 5 datacards of radio button and based on that I have to show forms - 

    well this worked out - on VISIBLE prperty of forms;

    If(Equipment.Selected.Value="Yes",true,false)

  • KroonOfficeSol Profile Picture
    587 on at

    He @sskv,

     

    First you don't have to use a If() formula at all, this because you're condition is true or false by default. 

    If it should be possible to show all the forms at once then radio button could be the way to go. Then you just use the formula:

     

    RadioButton.Selected.Value = ''

    If you want it to show on a combination you just do:

    RadioButton1.Selected.Value = '' || RadioButton2.Selected.Value = ''

    If you want it to be visible on false then add the not parameter like:

    !(RadioButton.Selected.Value = '')


    If only one screen should be visible at a time then get rid off the radio buttons and add a button (or Icon or Image control with a nice icon from PowerPoint for example) for each forms. Here you use a number variable. Formula():

    UpdateContext({Scr_Show:1})

    On the second and third button you use 2 and 3.  Then on the screens.visible property you use:
      

    Scr_show = 1

     

    On the second and third button you use 2 and 3 again. 

    If you want to show one off the screens at start then use in and add Blank(). With this you don't have to set you're variable at .Start/.OnVisible. This goes like:

    Scr_show in [Blank(), 1]

     

    I posted several video's on YouTube which explains the logic behind this approach, you can see them here YouTube Learn PowerApps. Start at video 14 till 19. This will basically teach you how to build a 30 screen app in just one screen and control the visibility off groups/controls with a few variables. 

     

    Btw, a nice effect is to set the buttons color/fill referenced to the header. Then use a if() formula to check on the Scr_show variable and set the color/fill to the opposite for the true and false result. Your button then stands out when it is selected. Formula is like:

     

    If(Scr_Show = 1, Header.Fill, Header.Color) // on the first button
    
    If(Scr_Show = 2, Header.Fill, Header.Color) // on the second button
    
    If(Scr_Show = 3, Header.Fill, Header.Color) // on the third button

    His would be for the .Color attribute off the button. So for the .Fill you turn the true and false parts around.

     

     

    Hope this helps.


    Greatings Paul

     

  • Gilbert_Wong Profile Picture
    7 on at

    Something goes wrong.           E.g.,Visibility property of Form2=Radio1.Selected.Value=Forms2.  It should be Form2=Radio1.Selected.Value="Forms2".  Don't forget the "" !!!!!!

    Your little error took me a long time.😭

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard