I got some buttons on a home page. Each of them opens the same edit form. How can I make each button open a different tab of the form?
E.g. the button "Open Tab 1" runs/opens the customers form and switches diretly to the Tab 1
E.g. the button "Open Tab 2" runs/opens the customers form and switches diretly to the Tab 2
etc..
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
open form, go to tab
open form, go to tab
You do not have the required permissions to view the files attached to this post.
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: open form, go to tab
Hi,
Add an onclick handler in the button's custom code:
In your form:
Add an onclick handler in the button's custom code:
In your form:
Code: Select all
function nuSelectTabByTitle(tab) {
$('[id^=nuTab]').each(function (index) {
if ($(this).html() == tab) {
var tabNumber = +index -1;
var e = document.getElementById('nuTab' + tabNumber);
nuSelectTab(e);
return true;
}
});
}
if (nuFormType() == 'edit') {
var tab = sessionStorage.getItem("selectTab");
nuSelectTabByTitle(tab);
}
You do not have the required permissions to view the files attached to this post.
Re: open form, go to tab
Timo,
toms has the right idea - set a variable on onclick.
https://wiki.nubuilder.cloud/ ... #nuOpenTab
Steven
toms has the right idea - set a variable on onclick.
Code: Select all
window.formTabNo=2;
Code: Select all
nuOpenTab(window.formTabNo);
Steven
You do not have the required permissions to view the files attached to this post.