- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2014 02:53 PM
Hi,
How do I auto-select/auto-focus a section when I click an UI Action or onSubmit client script?
I have tried using focus() and select() on the target field but it is not showing when the section form is not selected.
Please help....
Thanks,
Dor
Solved! Go to Solution.
- 6,625 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2014 03:29 PM
To switch to a particular form section (tab), use the following client-side code:
g_tabs2Sections.setActive(X);
where X is the number of the section (tab).
For more information on how to deal with form tabs in scripts, have a look at this blog post:
Demystifying form tabs | SNOWman's Blog
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 06:45 AM
You can use the following code to find out the number of a form section by the name of a field in that section:
g_tabs2Sections.findTabIndex('field_name');
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 05:21 PM
This is the helpful function, this one right here.
Thanks a lot, Slava! You saved my day today.
So people, in other words, here is the entire instruction you can use to get the focus on a desired section where there is a specific field:
g_tabs2Sections.setActive(g_tabs2Sections.findTabIndex('field_name'));

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2020 03:15 AM
Amazing. It isn't often that that first page I find on a Google search yields a result that is directly applicable and works with very little amendment.
Thank you.