Sometimes in Sharepoint, there may be a need to have more than one form layout for an individual list. Different fields or form designs may be required to differentiate between field values.
For example using a customers list, we may need to paint the form's background blue if the gender is male and pink if female.
PowerForms HTML supports different customizations for each list. By default, each form automatically creates a customization with no conditions applied and this customization is used every time the form appears.
In order to see the different form layouts, we select the following button on the editor screen:
A form containing the default customization appears:
Let's describe how to create a second form layout for the same list. For our example, we'll need to present a different form to the user everytime the item's title is test. To do so, we follow these steps:
- Select the default condition
- Enter our conditional statement in the Create copy with condition box. In our case, we want to automatically load this form customization every time the title is test. The statement is:
- Press on the Copy button.
*Note : You should use the field's Sharepoint name when trying to create a conditional statement and not the name given by the designer. i.e. notice we are using Title instead of c_Title.
From this point on, this customization will automatically load everytime the title is test. To visually differentiate between the two customizations, we select our newly created condition and press on the Select button. This causes the editor to load the selected customization.
Using the Editor, we decide to change the background color of the c_Title field to red. This means that everytime the Title is test, the box will have a reddish hue else it will be white.
Title is test
You can edit the conditional statement by going to the design form and selecting Options.