cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
oguruma
Helper II
Helper II

What exactly is a form?

I don't quite understand what a Form is, as it pertains to Power Apps. 

From what I can tell, it serves as a container for various fields linked to a data source, but what does it do other than that?

 

How is a form different than just putting the fields into a Container?

 

 

6 REPLIES 6
StretchFredrik
Super User
Super User

Form is like a questionaire that you use when you want user-input. 

Sundeep_Malik
Community Champion
Community Champion

Hey @oguruma 

 

As @StretchFredrik above has written its like a questionaire that you use when you want user-input. 

I agree. 

Things you can do with a form is like. 

Lets say you have a gallery of many items and records. And you want the person to select an item from the gallery to see everything about the gallery, you can use a form in the next screen just to show everything about the gallery item. This you can do with the help of Display Form.

Then if you want the user to edit that particular item you can use edit form to do that. 

If you want to add something new in the gallery you can use a new form for this.

 

So there are 3 types of forms in Power Apps, Display, Edit and New. You can use them as per your need. If you just want the user to see all about a record in an item, use display form, if you want him to edit it you can use edit and if you want the user to add a new item then use new form. Giving you some good links to understand the forms more. 

 

https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-forms

https://www.matthewdevaney.com/10-things-you-should-know-about-power-apps-forms/

 

Its a pretty useful control in Power Apps. 

 

I hope this helps. 🙂

But what does the form actually do?

Couldn't I just put the input fields in a Container instead of using a Form?

StretchFredrik
Super User
Super User

Forms also helps you with the submision of data by using the SubmitForm method

Sundeep_Malik
Community Champion
Community Champion

Yup, using it in a container, you will have to use patch to send data to SharePoint, and with a form you can easily submit data to database, with just submitform easily. 

LenC
Resolver I
Resolver I

A form is like a Controller for the view. The form has a 'Card' for each field of the item being edited.

 

Some of the value-added features include:

* Pre-configured layout of each Card, which includes a label, the field input control, a 'Required' indicator, and an error message label.

* The form can automatically adjust the layout of Cards based on the screen size. This subject is too complicated to get in here. Microsoft's Form documentation has one article that does a reasonable job explaining layout options such as #columns (hint: always set to 12), 'stretch to fit' (sic), etc.

* The Form tracks if any of the fields have changed, using the 'Unsaved' property

* The form tracks whether the current user input is valid, using the 'IsValid' property.

* Record changes can be committed using SubmitForm(form_name). An Event fires upon success or failure, where you can put response logic. Example: in the OnSuccess() event, call 'Back()' to close the current screen; in OnFailure(), call Notify( ... , NotificationType.Error).

* The form provides access to last Submitted record.

* The Attachment control only works in a Form, supposedly.

 

Some YouTubers recommend NOT using Forms. I started on the path of Forms, and have not gotten rid of them, selectively using them.

 

For straighforward CRUD operations and UI's, the Form control seem fine. It takes some work to understand nuances: knowing when to Reset() the form and when to set the FormMode; understanding layout behavior (especially when users will be resizing their browser); customizing Cards and their sub-controls; where you can use a form (ex: you can't stick Forms in a Gallery, nor in custom Components, IIRC).

 

Hope this helps. 

PS: I recommend YouTube creators Shane Young and Reza Dorrani.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,035)