Set focus action
In a form with several controls, the focus typically moves from one control to the next in a sequential manner. Use the Set focus action to set the focus to directly shift on a specific control.
In a Credit Check form for a loan applicant, two sections of details are submitted to evaluate credit worthiness of the applicant:
- Personal details such as Name, Surname, Date of Birth, and Age
- Income details such as Monthly income, Monthly Expenses, and Repayment Record (on other loans)
The Submit button is configured with two actions:
DB Query to add the applicant's personal details to the database as a record
Set Focus to shift focus to the Income field
Once the personal details of the applicant are submitted, the focus automatically shifts to the Monthly Income field in the Other Details section.
The Set focus action can only be configured for the following controls:
On the form modeling bar, click
Actions and click
The New action dialog box is displayed.
- On the Type list, select Set focus.
- Change the default Name (SetFocus1) to something meaningful.
- Optional. Enter a Description for the action.
- Optional. Select Multilingual to configure a unique action for each language separately. See Configure multilingual actions.
Control list, select the control for which you want to set focus.
Focus can only be set to one field.
- Click Save.
Associate the action with the control to trigger this action. See
Configure actions for form control
events. Alternatively to call this action for a form event, associate the action with the form. See
Associate an action with a form.
When this action is triggered, the focus is shown on the configured field.