Form State Scenario- Form Design
For this example, we are using the scenario as described in the Form State Scenario Introduction. The following features are used in this example:
- Add a Submit Action Button control
- Add Rules
- Add Form State
The following SmartObject and Views have previously been created as described in the Form State Scenario Introduction:
- Performance Appraisal SmartObject
- Create Performance Appraisal Item View
- Performance Appraisal Item View
Follow the steps below to create the Performance Appraisal Form.
- Right click the Performance Appraisal category and select New Form.
- Provide Form details on the General step and click Next.
- Drag the Create Performance Appraisal View onto the canvas and the Performance Appraisal View below.
- Add an Action button on the Form and rename the button to Submit.
- Edit the When the Form is Initializing rule on the rules step. Go to the actions step and add the rule definitions as shown below:
- Edit the rule On Create Performance Appraisal, when Create is Clicked and add the rule definitions as shown below. For this state, the Manager Comments and Rating fields are hidden and will not be displayed on the Form when it is opened by the employee.
- Click on configure next to the Load action and configure the Input properties as shown below:
- Click on Add Rule and add the rule definition as shown below for the Submit button on the Form. Configure the Save settings:
- Click on Add State. Type Manager State and edit the When the Form is Initializing rule that is linked to the Manager State. Disable the Hide Performance Appraisal View definition and Hide cmdSubmit Form control definition and add the rest of the definitions a shown below. Configure the Load settings. For this state the Create Performance Appraisal View is hidden but the Manager Comments and Rating fields will be displayed.
- Two states should be listed as shown below. The Form is therefore using two states with different rules and will behave differently when opened. Click Finish to complete the Form.
>