SharePoint List Custom Form

Using Power Apps, we can easily customize a New item form for a SharePoint list that works best for our team or organization.

The create a custom form for the SharePoint list follow the following steps:
Step 1: In the SharePoint site, browse to the list for which we need to create a custom form.

Step 2: If we click on + New. We can see there is a form to fill in to create a record in the sharepoint list. We are going to customize this form.

SharePoint List Form

Step 3: From the command bar, on the list page, select Integrate > Power Apps. More options appear:

SharePoint List Form

Step 4: Select the Customize forms option. The Power Apps studio appears and loads the form onto the canvas. If the Welcome to Power Apps Studio dialog box opens, select Skip.

SharePoint List Form

On the SharePointIntegration object, we have the following properties:

SharePoint List Form

The following form is same as shown in Step 2.

SharePoint List Form

Step 5: Add one Text label control and do some other changes like the fill colour and the font color of the labels.

SharePoint List Form

Step 6: Set a field to be view-only. Set the DisplayMode of a field to DisplayMode.View as the formula.
Step 7: We can specify the conditions based on the Selected record in the sharepoint list. The SharepointIntegration.Selected returns the selected record in the sharepoint list.

SharePoint List Form

For example, we are going to hide the Attachments field, if the Teachersalary is less than 20000. Select the card and set the visible property of that to the following powerapps formula.

Power Apps Formula

If(SharePointIntegration.Selected.'Teacher salary' > 20000, true, false)
SharePoint List Form

Step 9: The next step is to Publish our custom form. On the top of the command bar, click on Save icon to save the app.

SharePoint List Form

Alternatively, to save the app, press Ctrl+S in the power apps studio. After saving the app, select Publish icon in the command bar to publish the app.

SharePoint List Form

In the dialog box that appears, to confirm, select Publish to SharePoint.

SharePoint List Form

The version of the custom form that appears in SharePoint is the most recently published version.
Step 11: In SharePoint, click on + New and play with the form to verify the intended functionality of the app.

SharePoint List Form

Step 12: We can revert to the default form. From the list in SharePoint, open the settings page (by selecting the gear icon near the upper-right corner), and then select List settings.

SharePoint List Form

Step 13: Under General settings, select Form settings.

SharePoint List Form

On the Form Settings page, select one of these options, and then select OK.

We can toggle back and forth between options, as needed.

SharePoint List Form