Discussions

Expand all | Collapse all

Next Button on a Multi Tabbed Form

  • 1.  Next Button on a Multi Tabbed Form

    Posted 08-15-2019 19:30
    I have a multi tabbed form that I want a next button at the bottom of the first tab that when clicked opens up the second tab automatically. I tried following the article here: https://community.quickbase.com/quickbase/topics/how-do-i-create-a-button-that-allows-the-user-to-continue-to-the-next-tab

    I walked through all of the steps and have a button on my form that says "next" but it doesnt do anything when I click on it. Is there any other explanation as to where I may be messing this up? 

    Heres what I have: 

    Next button on form: Rich text formula:   [customButtonScript1]    & "SaveAndNextTab.js"
        & [customButtonScript2]
        & "' class='Vibrant' style='color:white; background:#427cd8; white-space:nowrap;'>Next</a>"
       & "<a class='Vibrant Danger' style=\"width:180px; text-align: center;\" onclick='DoSaveAndNext()' href='#'>23B. Save and Next</a>"


    Home url: https://elginservicecenterinc.quickbase.com/db/bpgjc56je

    New page: title: SaveAndNextTab.js     
    text:
     var nextTabLink=$("li.ui-tabs-selected").next().children("a"); 
    $("#saveAndKeepWorkingMenuOption").click(); 
    $(nextTabLink).click();

    Variable 1 title: customButtonScript1
    text: <a href='javascript:($.getScript("https://elginservicecenterinc.quickbase.com/db/bpgjc56je?from=myqbe=";

    Variable 2 title: customButtonScript2

    Text: "));void(0);


  • 2.  RE: Next Button on a Multi Tabbed Form

    Posted 08-15-2019 19:41
    Well the SaveAndNextTab javascript still works, at least for me, so that part is fine.

    Is that the full code for your "customButtonScript1? Shouldn't it be pointing at your javascript page? From my understanding of what you linked you would need a=dbpage&pagename= at the end of the url instead of from=myqbe=.



  • 3.  RE: Next Button on a Multi Tabbed Form

    Posted 08-15-2019 19:48
    I'm probably mistaking what to do here, but the article I was following said custombuttonscript1 contains:  <a href='javascript:($.getScript("https://xxxx.quickbase.com/db/yyyyyyyy?a=dbpage&pagename=

    where the url is your apps home page. 


  • 4.  RE: Next Button on a Multi Tabbed Form

    Posted 08-15-2019 20:12
    Yes but the portion they are talking about is the yyyyyyyyyyyyy section of the url. It just means it needs to be your apps home page dbid because that is where the pages are stored. When you go to the base page of your app copy that dbid into the spot where it shows the yyyyyyyyyy and leave the rest of the URL on the end the same. Only edit the yyyyyyyyyyyy.

    This should just work unless I misspell something.

    <a href='javascript:($.getScript("https://elginservicecenterinc.quickbase.com/db/bpgjc56je?a=dbpage&pagename=


  • 5.  RE: Next Button on a Multi Tabbed Form

    Posted 08-15-2019 20:26
    I changed that part to: <a href='javascript:($.getScript("https://xxxx.quickbase.com/db/bpgjc56je?a=dbpage&pagename">https://xxxx.quickbase.com/db/bpgjc56je?a=dbpage&pagename">https://xxxx.quickbase.com/db/bpgjc56je?a=dbpage&pagename= where I only edited the YYYYYYYY to my dbid. The button still does nothing though. 


  • 6.  RE: Next Button on a Multi Tabbed Form

    Posted 08-15-2019 20:50
    Sorry- I did change the XXXX part as well.  I have <a href='javascript:($.getScript("https://elginservicecenterinc.quickbase.com/db/bpgjc56je?a=dbpage&pagename=


  • 7.  RE: Next Button on a Multi Tabbed Form

    Posted 08-15-2019 23:21
    You saved your SaveAndNextTab.js as a code page specifically right?

    Are you getting any errors in the console? In chrome you can hit f12 to bring up the dev resources. Are you maybe getting an error about DoSaveAndNext() being undefined? Looking at your button you have a part in there that says "onclick='DoSaveAndNext()' " but I don't actually see that on the tutorial you linked. Sorry if I'm missing it. Do you have the save and keep working button enabled in form properties as well?

    You have also added some additional things onto the end of the javascript they provided. I would try and get it working with their exact example and then after that you can try and change it up.

    Something I forgot to ask, are you using the code from the first reply or replies down below it? 


  • 8.  RE: Next Button on a Multi Tabbed Form

    Posted 08-16-2019 12:42
    Yes those things seemed to help. Thank you!


  • 9.  RE: Next Button on a Multi Tabbed Form

    Posted 6 days ago
    Hi,

    This code no longer works as of 11/5/19. Not sure how to  update it. Got any thoughts?

    ------------------------------
    GMacri
    ------------------------------



  • 10.  RE: Next Button on a Multi Tabbed Form

    Posted 6 days ago
    Can you describe what is not working? Are you on mobile or desktop?