Discussions

Expand all | Collapse all

Save and redirect to a thank you page

  • 1.  Save and redirect to a thank you page

    Posted 01-02-2020 18:30
    I have a form that I need an external user to complete. I want to add a Submit button, that will Save and Close the record and direct them to a Thank you page. I have a Home Page that has a Thank you text and image, I assume I can make an HTML page with information as well. 
    I am not sure where to start, I have a Formula URL field, and not sure what to put in the formula field. 
    I checked out a lot of the discussions, and just confused about where to start. 
    Looking for some assistance and guidance.

    ------------------------------
    RWest8 RWest8
    ------------------------------


  • 2.  RE: Save and redirect to a thank you page

    Posted 01-02-2020 20:00
    Perhaps not intuitive, but the way to do this is not in the Submit button but on the button to add a new record.  We use the Syntax for &NextURL = ... to control where the user goes after the native Save.  We have to URLEncode when we nest successive URLs. 

    URLRoot() & "db/" & [_DBID_table where the new record will be added] & "?a=nwr&nexturl=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=showpage&pageid=5")

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 12:40
    We don't have them add the record. The record is created by us, and based on certain selections a notification of the record is sent to the outside person. They fill out the information they need to and then save. I wanted to add a Submit button at the end, so they click that, save the record, and redirects them to a Thank you home page. 
    It was requested to have a Submit button at the bottom, rather than use the Save button at the top.

    ------------------------------
    RWest8 RWest8
    ------------------------------



  • 4.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 12:49
    OK, what if you send then a link to edit the record.

    URLRoot() & "db/" & [_DBID_table where the record will be edited] & "?a=er&rid=" & [Record ID#] &nexturl=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=showpage&pageid=5")

    I have not tested that, but it might work.

    There is a pretty straight forward way to make your own save button with any color and label, which i can supply if needed.  You can suppress the native save button by suffixing the URL with 

    &ifv=1

    URLRoot() & "db/" & [_DBID_table where the record will be edited] & "?a=er&rid=" & [Record ID#] &ifv=1&nexturl=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=showpage&pageid=5&ifv=1")

    If it is possible to make a button which will save and redirect, it would require using what is known as the IOL - Image On Load technique, which is non native, and non supported by Quick Base and will break in the future when they launch their new forms (not sure when that will happen, but forms have been mostly the same since like 2001, so they well know its time for an update.

    So that is why I'm suggesting to explore a native solution.


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 13:50
    I tried the code you provided, however, I got a syntax error message. 

    URLRoot() & "db/" & [_DBID_PRE_SURVEY] & "?a=er&rid=" & [Record ID#] &ifv=1&nexturl=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=showpage&pageid=7&ifv=1"

    What would I do to simply have it save the record?

    And then to explore, what would be the native option and how that would work. 

    Sorry, I am not very good at coding, in the process of learning.

    ------------------------------
    RWest8 RWest8
    ------------------------------



  • 6.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 14:08
    When you have a syntax error its much easier for us to help you if you not only post your code (which you did) but also the whole text of the error.

    But try this

    URLRoot() & "db/" & [_DBID_PRE_SURVEY] & "?a=er&rid=" & [Record ID#] & "&ifv=1&nexturl=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=showpage&pageid=7&ifv=1")

    Once you use the syntax to hide the regular features of the form and hence hide the native save button then you would need to make a rich text formula field for the user to click to save.

    Try this code.

    "<a class='Vibrant Primary' style=\"width:180px; text-align: center;\" onclick='DoSaveAdd()' href='#'>Submit</a>"


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 16:17
    Thank you. The Submit button works great!
    Where do I enter the code prior? 

    URLRoot() & "db/" & [_DBID_PRE_SURVEY] & "?a=er&rid=" & [Record ID#] & "&ifv=1&nexturl=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=showpage&pageid=7&ifv=1")

    I was entering it into a Formula URL, that is where I got an error, assuming the wrong place. 


    ------------------------------
    RWest8 RWest8
    ------------------------------



  • 8.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 17:28
    Since this, you say, is being sent out by an email Notification, then the formula would go into a formula URL field on the record and you would have words on the email notification like

    Click here [my url field goes here] to complete your registration.

    If there are still Syntax errors with that untested formula, please copy and paste in the syntax error text.


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 9.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 18:31
      |   view attached
    Thank you! 
    That works! The notification sent successfully with the link. I like the way it displays. 
    However, when I clicked the Submit button, I was given and Error, page not found. 
    The record was saved and updated.

    ------------------------------
    RWest8 RWest8
    ------------------------------



  • 10.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 18:51
    OK, so we are getting there.

    This part of the formula here

    a=showpage&pageid=7

    is saying to display page # 7

    When you look at your list of pages, the page ID# is on the right. So check that you are displaying a page which, in fact, does exists :) 





    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 11.  RE: Save and redirect to a thank you page

    Posted 01-03-2020 18:58
    Opps I changed the ID to the wrong one. Yes, it is 7. It works perfectly now! 

    Thank you for your help. it is much appreciated.

    ------------------------------
    RWest8 RWest8
    ------------------------------