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 Button, DatePicker, Checkbox, CheckboxGroup, ColorPicker, Combo, Input, RadioGroup, Select, Slider, Textarea, TimePicker controls of Form.
Related sample: Form. Set focus on control
Change log:
added in v7.0