cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cooltechie
Level: Powered On

How to conditionally make form read only?

Hi,

 

I have a Power Apps form and what I am trying to achieve is that when the form is loading, it should check whether submitted = yes, then, the form should be read only or disabled and  should not be allowed to edit.

 

Any advise how to achieve this on an entire form instead of checking the condition individually on all fields on the form?

 

 

3 REPLIES 3
Super User
Super User

Re: How to conditionally make form read only?

On the DisplayMode property of the Form use this code

If(submitted=“yes”,View,Edit)

—-
Please Accept as Solution if this post answered your question so other can find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
cooltechie
Level: Powered On

Re: How to conditionally make form read only?

Hello,

 

I do not see a property with the name DisplayMode for the form. I see this property for individual control on the form.

Super User
Super User

Re: How to conditionally make form read only?

@cooltechie 

My earlier post was wrong.  You'll want to use this code in an OnSelect property of the button or gallery that leads you to the form.  Alternatively, you could also choose to put this in the OnVisible property of the screen containing the form.

 

If(submitted="yes",ViewForm(your_form_name),EditForm(your_form_name))

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,753)