Forum Discussion
BradLemke
6 years agoQrew Assistant Captain
Referencing: https://community.quickbase.com/quickbase/topics/custom-buttons-for-tabbed-forms-save-next-tab-save-same-tab
I've used a modified version of this how-to guide to create a 'Save Button' inside a form that modifies a couple of hidden fields, then saves all current changes, and then re-opens the form in a targeted tab.
My (Formula Rich Text) button code is as follows:
[CBSc1]
& "Modified.JS"
& [CBSc2]
& [CBSt - SKW]
& "Button Text"
& [CBE]
My variable codes are unchanged from the original, but listed as follows:
On my Modified.JS page:
$("#_fid_10").val("Unlock");
$("#_fid_11").attr("checked", true);
var nextTabLink=$("li.ui-tabs-selected").next("[style!='display:none']").children("a");
$("#saveAndKeepWorkingMenuOption").click();
var noErrorDialog=$('#qbDialog').length==0;
if( noErrorDialog ){
$("#tab_t2_link a").click();
location.assign('#navTop');
};
I've used a modified version of this how-to guide to create a 'Save Button' inside a form that modifies a couple of hidden fields, then saves all current changes, and then re-opens the form in a targeted tab.
My (Formula Rich Text) button code is as follows:
[CBSc1]
& "Modified.JS"
& [CBSc2]
& [CBSt - SKW]
& "Button Text"
& [CBE]
My variable codes are unchanged from the original, but listed as follows:
- [CBSc1] - <a href='javascript:($.getScript("https://PLACEHOLDER.quickbase.com/db/PLACEHOLDER?a=dbpage&pagename=
- [CBSc2] - "));void(0);
- [CBSt - SKW] - ' class='Vibrant Tall' style='font-size:14px; color:white; background:#6BBD57; white-space:nowrap;'>
- [CBE] - </a>
On my Modified.JS page:
$("#_fid_10").val("Unlock");
$("#_fid_11").attr("checked", true);
var nextTabLink=$("li.ui-tabs-selected").next("[style!='display:none']").children("a");
$("#saveAndKeepWorkingMenuOption").click();
var noErrorDialog=$('#qbDialog').length==0;
if( noErrorDialog ){
$("#tab_t2_link a").click();
location.assign('#navTop');
};
HannahWright3
5 years agoQrew Trainee
Hey @Brad Lemke,
I'm trying to do something similar and tried using some of your code but have come across some difficulties.
I created a separate post to the community. Would you mind taking a look to see if you know where I'm going wrong?
Quick Base Community Post: Opening Form to Specific Tab
------------------------------
Hannah Wright
------------------------------