solid-ui
solid-ui copied to clipboard
'autofocus' Common Field Property
User Story
As a Form Designer, I want to specify which data element on a form should receive input focus as soon as the form is loaded, so that the user can start typing immediately without having to specifically click on or tab to that control.
Acceptance Criteria
- In the Form Model describing the form, I can set a 'autofocus' = true property on a single form data element to specify the data element that should receive focus when the form is loaded. The default is 'autofocus' = false.
- When the form is rendered based on the Form Model, focus is given to the specified data element. If the 'autofocus' = true property is set for multiple fields, the first field receives the focus.
(If you leave behavior with > 1 autofocus undefined you make it simpler to code ... just focus the element when you generate it. Not a biggy)