Skip to main content

setFocus()

sets focus to a Form control by its id

setFocus(name: string): void;

Parameters:

name|id: string - the name of the control or its id (if the name attribute is not defined in the config of the control)

Example

form.setFocus("checkbox");
note

The method is applicable to DatePicker, Checkbox, ColorPicker, Combo, Input, RadioGroup, Select, Textarea, TimePicker controls of Form.

Related sample: Form. Set Focus On Control

Change log:

added in v7.0