Power Apps Modern Form Control – How to Use

The form control in Power Apps displays, edits, and submits data to data sources. Modern form control enables users to build professional-looking forms with flexible design options.

In this article, I will explain the following topics:

  • How to use Power Apps modern form control
  • Power Apps submit modern form data to the SharePoint list

How to Use Power Apps Modern Form Control

In Power Apps, to get the modern form control, we first need to enable the modern controls in Settings. Follow the steps below to do this!

1. In the Power Apps application, click on ellipses () on the top navigation -> Click on Settings.

power apps modern form control

2. From Updates -> Under New -> Enable Modern controls and themes.

how to enable modern controls in powerapps

3. Click on +Insert tab in top navigation ->Under Layout -> Select Form (preview).

power apps modern form control people picker

I have a SharePoint list named “Employee Leave Requests.”

power apps modern form control sharepoint list
Column NameData Type
Leave TitleSingle line of text
Employee NamePerson
Submitted DateDate&Time
Start DateDate&Time
End DateDate&Time
Team LeadPerson
Leave Type Choice
DepartmentChoice
Leave DaysNumber
Reason For LeaveMultiline text

4. Connect the Power Apps modern form control with the data source. Here, I connected with the SharePoint list.

DataSource = 'Employee Leave Requests'
modern form control power apps

5. To add the fields into the Form control-> Go to the Properties -> Click on Edit fields -> Click on +Add field. ->Select the fields and click on Add.

By default, it adds only a few fields.

power apps modern form control general availability

6. As in the example below, You can also drag and drop the fields in the Power Apps modern form control.

power apps modern edit form controls

7. To change the properties of the fields in modern form control, click on the field, go to the Advanced section, and click on Unlock to change properties.

powerapps modern control form item property

8. Power App’s modern form control has a Layout property to change the layout, like

  • Horizontal
  • Vertical

Also, the Column property enables us to provide the number of columns present in the form control. To use the above two properties, look at the example below.

power apps modern form control layout

9. Choose New for the Default mode property. We must make the form control new to submit data to the data source.

power apps form control tutorial - new edit form

10. Look at some of the new properties for designing the field title(DataCardKey) present within the data card of the field.

PropertyDescription
AlignIt has the values Start, End, Center, and Justify, which apply horizontally.
Vertical align Top, Middle, Bottom.
Positions[X, Y]– Distance between the control’s left side and the screen’s left edge.
Y – Distance between the top of the control and the top edge of the screen.
FontChoose the font from the dropdown.
Font sizeProvide the number for font size.
Font colorChoose the color for the font.
Font weightBold, Semibold, Regular, Medium.
Font styleChoose from Italic, Underline, or Strike.
Border Provide Border style, Border thickness, and Border color.
Top left, right, & Bottom left, right radiusProvide the border radius.
With the example below, you can understand how the data card key label properties work.
power apps modern form control properties

11. Look at the properties for DataCardValue in each field datacard in the Power Apps modern form control.

PropertyDescription
Placeholder textEnter some text to understand the field’s purpose.
ModeChoose from Single line, Multiline
TypeChoose the type of text from Text, Password, Search.
DisplaymodeBy default, Parent.DisplayMode will be present. But this property has the following values: Disabled, Edit, View.
Trigger outputThis property enables when the formula provided in the OnChange property needs to trigger:
Delayed: Triggers OnChange after a half-second delay. Useful for delaying expensive operations until the user completes inputting text.
Keypress: Triggers OnChange immediately as the user types.
FocusOut: Triggers OnChange only when the text input control loses focus.
AlignStart, End, Center, Justify. This align applied horizontally.
Positions[X, Y]– Distance between the control’s left side and the screen’s left edge.
Y – Distance between the top of the control and the top edge of the screen.
Size (Width, Height) Provide the width and height for the data card value.
Padding [Top, Bottom, Left, Right]Space between the text and border of the data card value.
AppearanceAppearance of the control’s border and fill. It has values: Filled Darker, Filled Lighter, Outline.
Color paletteProvide a color theme for data card value.
FontChoose the font from the dropdown.
Font sizeProvide the number for font size.
Font colorChoose the color for the font.
Font weightBold, Semibold, Regular, Medium
Font styleChoose from Italic, Underline, or Strike.
BorderProvide Border style, Border thickness, and Border color.
Border radiusProvide the number of the border-radius.
In the example below, you can see how the properties work.
modern form properties power apps

12. To change the default text for the choice field in the Power Apps form control. Click on the data card value -> Open Properties -> Advanced -> InputTextPlaceholder -> Provide the custom text within quotes.

modern new form in power aps

13. A modern combo box control won’t display all the people’s names if the form control has a person field. Many people face the same issue.

Modern form control in power apps canvas app

Here, I will explain an alternative solution to this problem. Connect the Power Apps application with Office365Users.

modern form control properties in power apps canvas app

14. Then, add the code below to the OnStart property of the App object.

ClearCollect(
    UserCollection,
    Office365Users.SearchUser({
        searchTerm: "",
        top: 999
    })
);
AddColumns(UserCollection, 
    Claims, UserPrincipalName,
    Email, Mail,
    DepartmentName, Department
);

I created a collection named UserCollection, containing all Microsoft 365 users. I took the top 999; you can take the number according to your wants.

Also, UserCollection contains columns like Claims, Email, and DepartmentName.

save power apps canvas app modern form data to sharepoint

15. Provide the below collection name in the items property of the Employee Name data card value. Also, provide the same collection name for the Team Lead data card Value.

Note: In case, you’re using different example then in place of person fields’ data card values’ items property provide this collection name.

UserCollection
powerapps submit modern form to sharepoint list

16. Add the below code in the Update property of the Employee Name DataCard.

{
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & DataCardValue_EmpName.Selected.Mail,
    Department: "",
    DisplayName: DataCardValue_EmpName.Selected.DisplayName,
    Email: DataCardValue_EmpName.Selected.Mail,
    JobTitle: "",
    Picture: ""
}

Here, DataCardValue_EmpName is the employee name’s data card value name.

powerapps modern form submit to sharepoint list

17. Add the below formula in the Update property of the Team Lead Data Card.

{
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & DataCardValue_TeamLead.Selected.Mail,
    Department: "",
    DisplayName: DataCardValue_TeamLead.Selected.DisplayName,
    Email: DataCardValue_TeamLead.Selected.Mail,
    JobTitle: "",
    Picture: ""
}

DataCardValue_TeamLead is the team lead data card value name.

modern form control in powerapps canvas app

Now, save all the changes, and to submit the form details, follow the below section.

Submit Power Apps Modern Form Data to SharePoint List

In Power Apps, we must use the SubmitForm() function to submit the form data to the SharePoint list.

Syntax:

SubmitForm( FormName )

FormName is a required parameter. Provide the name of the form within the above function.

Add a button control to save the form data to the data source. Provide the code below for its OnSelect property.

SubmitForm(Form)
submit power apps modern form to sharepoint list

Save changes and Preview app: after filling in the leave request details in the form control, click the save button control.

powerapps modern form control controls preview

I hope you understand how to use Power App’s modern form control and the properties of data card keys and values. I also explained how to get Microsoft 365 users into the person field in the form control and save those fields’ data to the SharePoint list.

The Power Apps modern form control can be used as an alternative to the classic form; it provides various properties and designs that look like professional forms.

Also, you may like:

>