1. What is a Form widget ?
The Form widget is used to insert a form that has been previously created into another form.
The advantages of using the Form Brick include:
- When you modify the form that has been inserted into other forms, the original form updates automatically in all forms containing it.
- Task tags within the form remain unchanged when inserted into other forms, allowing for consistent custom reporting.
Similar to a template, the inserted form can only be edited at the source, meaning you must enter the editing studio of the form itself to make changes.
2. How is it different from the Model Brick?
Unlike a Model, the inserted form is also visible independently on the mobile application. Models are not visible on the mobile application, whereas forms are fully functional standalone forms.
3. How to practically use the Form Brick?
Scenario: Imagine an administrator wants to reuse a form created previously within a new form.
To insert a form into another form, use the Form Brick in the editing studio, then select the appropriate form from the dropdown list:
Appearance on the Application:
- Ensure to publish the form to insert it into other forms.
- The form can only be edited at the source and cannot be modified once inserted.
- If the form is called multiple times within a form, a number is incremented in the model tag to differentiate the input values. This ensures values are captured correctly each time the same model is called in custom reports. Consequently, use the correct incremented tags in custom reports as they will differ for each repetition.
- When a Form is imported into another form using a Form Brick, the associated custom report template from the first form is not imported.
4. Example for Client Cases
This brick is often used to guide the intervention form based on the technician's responses.
For example: During an intervention, my technician is asked whether maintenance should be performed on an escalator. Depending on the response, the technician will be directed to either a maintenance form or a simple inspection form.
To set up this use case, use display conditions: conditionally display a form based on previous responses entered by the technician.