Forum Discussion

KendylBrockman's avatar
Qrew Member
2 years ago

Redirecting to a "thank you" page

I've created an EOTI form, so that the public is able to submit questions or comments to our office. After someone hits submit, I'd like them to be redirected to a "thank you page". I've been reading up on past discussion on this topic, and have it figured it out 90% of the way. I came across a code provided by Dan Ladner, that is working well but it's redirecting me to an error page. 

The code provided by Dan Ladner: 
var text rdrURL = "";
"<a class='SaveBeforeNavigating' href='" & $rdrURL & "'>Submit</a>"​​

I've updated the URL "" to the thank you page I've created within our website. While testing this, I have been redirected to another page but it's an error page. I think the reason I'm getting redirected to an error page is because somehow extra letters and words are being added to the URL once hitting submit. Please see snapshot, at the end of the webpage URL I've added, ">Submit</a>'>Button%20Text</a> has been attached at the end. 

This is what it looks like in my QB:
Does anyone happen to know how to update this so that it only redirects to the URL I'm copying in?

Thank you!!
Kendyl Brockman


Kendyl Brockman

5 Replies

  • Hi Kendyl,

    looks your missing some info in your formula there.   

    All you have there is the variable called 'rdrURL'.

    Here's the code from a button I have that is doing something similar when someone hits the 'decline' button on a form.  This code changes a multiple choice field to 'Decline' then redirects the user to a simple page that confirms they have declined.   You should be able to change this code to fit your need.

    This is a formula-rich text field.

    var text ButtonWords = "Decline";
    var text URLONE = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
    & "&apptoken=YOUR_APP_TOKEN"
    & "&_fid_17="&"Decline";  
    var text URLTWO = URLRoot() & "db/" & AppID() & "?a=showpage&pageid=3";
    var text URL =
    & "&rdr=" & URLEncode($URLTWO);
    // Begin button style
    var text bgcolor = "#cc4c2f";
    var text txtcolor = "white";
    var text style = "style=\"text-decoration: none; width: 100px; text-align: center; background:" & $bgcolor & "; border-radius: 5px; padding: 8px 10px; color: " & $txtcolor & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
    // End button style
    "<a " & $style & " href=" & $URL & ">" & $ButtonWords & "</a>"

    Jeff Peterson
    • KendylBrockman's avatar
      Qrew Member
      Hi Jeff, 
      Thank you so much for your response! Would I put the URL I'd like to be redirected to after "var text URL = " or where would that go? 


      Kendyl Brockman
      • JeffPeterson1's avatar
        Qrew Captain
        You can replace the URL2 variable with the URL you are redirecting to. 

        var text URLTWO = "";

        Jeff Peterson