- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 01:38 PM
I have successfully used g_tabs2Sections.setActive(X); to highlight/activate a section in a form from (1) an onChange client script and (2) from a UI action button,
but the customer wants the users cursor to be placed in that section also. Can we do that ? Thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 03:24 PM
I think you would just have to set the focus to be the first field in the section. Unfortunately, I'm not aware of a great way to automatically get the first field in the section so you'd have to hardcode the field name. Something like this:
g_form.getControl('fieldname').focus();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2018 11:41 AM
HI Brad,
In reopen UI action, I am using following 3 lines.But g_form.getControl('comments').focus(); is not focusing additional comments field . Is any way to do this ?
g_form.setMandatory('comments', true);
g_form.addErrorMessage('Please enter the comments ');
g_form.getControl('comments').focus();