Forum Discussion
ShannonHenry1
6 years agoQrew Trainee
If you mouse over the tab you want to direct the user to and look at the link displayed in your status bar, you'll see a string at the end of the URL like #tab_t1
Append that string to the URL in your magic button and it will open the form with focus on the selected tab.
Append that string to the URL in your magic button and it will open the form with focus on the selected tab.
- QuickBaseCoachD6 years agoQrew Captain@Shannon. It would be amazing if your simple suggestion worked, but I could not get it to work. Have you tested this?
- BradLemke6 years agoQrew Assistant CaptainReferencing: 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:- [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');
};- HannahWright35 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
------------------------------
- BradLemke6 years agoQrew Assistant CaptainMy absolute favorite aspect of this method is that has the ability to edit more fields in a single button press than the typical API_editrecord formula URL - because it's all done by backend script. Introducing this has allowed me to trim down the number of form rules present in my primary data-entry form, which increases performance on many of my companies' older workstations.
A couple drawbacks that I know of, at the moment: I have absolutely no idea how to set certain types of fields (User, in particular) using this method, nor am I aware of a method to modify the destination url (such as loading in Ifv=1).