Page 1 of 1
open form, go to tab
Posted: Sat May 05, 2018 9:46 am
by Timo
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..
opentabs.PNG
editform.PNG
Re: open form, go to tab
Posted: Mon May 07, 2018 8:27 pm
by toms
Hi,
Add an onclick handler in the button's custom code:
custcode.png
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);
}
Re: open form, go to tab
Posted: Mon May 07, 2018 10:46 pm
by admin
Timo,
toms has the right idea - set a variable on
onclick.
tab1.PNG
tab2.PNG
https://wiki.nubuilder.cloud/ ... #nuOpenTab
Steven
Re: open form, go to tab
Posted: Wed May 09, 2018 9:10 am
by Timo
Thank you guys

Re: open form, go to tab
Posted: Thu May 10, 2018 12:06 am
by admin
.