Focus on different tabs for different views
-
- Posts: 3
- Joined: Thu Sep 03, 2015
Hello,
Is it possible to make the Edit Form to be open on the second tab instead of the first one as it's set by default.? And if possible, is it possible to make it more complex, including an evaluation of a field.
For example, if the project status field value is on going then if opening the edit view it should go to the Status Tab.
Thanks,
Is it possible to make the Edit Form to be open on the second tab instead of the first one as it's set by default.? And if possible, is it possible to make it more complex, including an evaluation of a field.
For example, if the project status field value is on going then if opening the edit view it should go to the Status Tab.
Thanks,
Hello!
Are you talking about the Tabs control? If so, you can insert the following code into the JavaScript editor for the Edit form:
Where fd_tabcontrol-0 is the ID of your tab control (it's auto incremented starting from 0: fd_tabcontrol-0, fd_tabcontrol-1, etc) Or to do it for all tab controls on the page:
If you want to implement some logic with opening a particular tab, you can do something along the lines of:
Where the last digit in $('#fd_tabcontrol-0').tabs('option', 'active', LASTDIGIT); is the number of your tab in your tab control, starting from 0. So, if you 'Status' tab is the third tab, then $('#fd_tabcontrol-0').tabs('option', 'active', 2); would open it.
Are you talking about the Tabs control? If so, you can insert the following code into the JavaScript editor for the Edit form:
Code: Select all
$('#fd_tabcontrol-0').tabs('option', 'active', 1);
Code: Select all
$('div[id^="fd_tabcontrol-"].ui-tabs').tabs('option', 'active', 1);
If you want to implement some logic with opening a particular tab, you can do something along the lines of:
Code: Select all
if (fd.field('StatusFieldInternalName').value() == 'Ongoing') {
$('#fd_tabcontrol-0').tabs('option', 'active', 2);
}
else {
$('#fd_tabcontrol-0').tabs('option', 'active', 1);
}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests