Forum Discussion
_anomDiebolt_
Qrew Elite
You would have to save the current tab in localStorage after every tab change and read it back in when the form reopens and set the current tab. This is how QuickBase remembers open sections on a per user basis.
This is not something I would contribute publicly so if you want to pursue a solution feel free to contact me off-world using the information in my profile:
https://quickbase-community.intuit.com/users/513/
This is not something I would contribute publicly so if you want to pursue a solution feel free to contact me off-world using the information in my profile:
https://quickbase-community.intuit.com/users/513/
JoshuaTate
7 years agoQrew Cadet
Hey Dan,
Heres a solution to the above question, so long as #tab_TXX is in the RURL that is set before the user creates a new record etc this function can be run on page load via BOL/IOL etc
function returnToTabz(){
//Step1 - find the hash in the URL and make it match the tab naming convention
var rmHas = document.location.hash.replace("#", '');
//add link to end of the variable
rmHas += "_link"
//Step2 - Generate an array from tablist
var finoActivo = document.querySelector('#formTabsList').childNodes
var moloActivo = Array.from(finoActivo);
//Step3 - iterate through each confirming the expected result is not the current tab viewed else make it the active tab.
var moloLen = moloActivo.length-1;
for (var ps = 0; ps < moloLen; ps++) {
if (moloActivo[ps].nodeName !== "#text") {
if (moloActivo[ps].classList.contains('ui-state-active') === true ) {
if(moloActivo[ps].id !== rmHas) {
var rmBoA = moloActivo[ps].id.replace('_link', '');
var rmBoB = rmHas.replace('_link', '');
//if current active is not the target then make it so
var rmGiv = document.querySelector('#'+rmHas).classList;
var rmBoAcl = document.querySelector('#'+rmBoA).classList;
var rmBoBcl = document.querySelector('#'+rmBoB).classList;
var liteBe = moloActivo[ps].classList;
liteBe.remove('ui-state-active', 'ui-tabs-selected');
rmGiv.add('ui-tabs-selected', 'ui-state-active');
rmBoBcl.remove('ui-tabs-hide');
rmBoAcl.add('ui-tabs-hide');
}}
}}}
Heres a solution to the above question, so long as #tab_TXX is in the RURL that is set before the user creates a new record etc this function can be run on page load via BOL/IOL etc
function returnToTabz(){
//Step1 - find the hash in the URL and make it match the tab naming convention
var rmHas = document.location.hash.replace("#", '');
//add link to end of the variable
rmHas += "_link"
//Step2 - Generate an array from tablist
var finoActivo = document.querySelector('#formTabsList').childNodes
var moloActivo = Array.from(finoActivo);
//Step3 - iterate through each confirming the expected result is not the current tab viewed else make it the active tab.
var moloLen = moloActivo.length-1;
for (var ps = 0; ps < moloLen; ps++) {
if (moloActivo[ps].nodeName !== "#text") {
if (moloActivo[ps].classList.contains('ui-state-active') === true ) {
if(moloActivo[ps].id !== rmHas) {
var rmBoA = moloActivo[ps].id.replace('_link', '');
var rmBoB = rmHas.replace('_link', '');
//if current active is not the target then make it so
var rmGiv = document.querySelector('#'+rmHas).classList;
var rmBoAcl = document.querySelector('#'+rmBoA).classList;
var rmBoBcl = document.querySelector('#'+rmBoB).classList;
var liteBe = moloActivo[ps].classList;
liteBe.remove('ui-state-active', 'ui-tabs-selected');
rmGiv.add('ui-tabs-selected', 'ui-state-active');
rmBoBcl.remove('ui-tabs-hide');
rmBoAcl.add('ui-tabs-hide');
}}
}}}