View Full Version : How to set the default focused field in a form?

7 May 2010, 5:02 PM
How does one go about setting the "default" selected / focused field in a form?

Hook into onRender and then set the focus on the first field?

I'd think there'd be a default for this -- it seems like a common usability touch.

Specifically, I'm looking for this behavior: when a form is presented, the "logical default" field is highlighted.
E.g. do a "file->save-page-as" in your browser right now... Note that the "filename" field is focused and ready for accepting input (no need to click).



(ps. I note the samples also require the customer to "click to focus"; i'd suggest adding this to the samples.)