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?
As @StretchFredrik above has written its like a questionaire that you use when you want user-input.
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.
Its a pretty useful control in Power Apps.
I hope this helps. 🙂
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.
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.
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!