Can I dynamically change the redirect URL?

You can set your redirect URL under the Form Settings tab, in the Redirect section.

You have 4 options for redirecting your forms:

  1. Localized Thank You page
  2. Site redirect
  3. Custom Thank You Message
  4. Force JSON response

Dynamically, you can change the address that a web browser is redirected to after a form is submitted by assigning a value to a form parameter called _redirect_url.

Here is an example of how to do this based on something being selected by a user:

<!-- Load jQuery -->

<!-- Our form! -->
<form accept-charset="UTF-8" action="" method="POST">
  <input type="hidden" name="utf8" value="✓">

  <!-- The hidden redirect form element -->
  <input type="hidden" id="redirect" name="_redirect_url" value="">

  <!-- Select your favorite blog and we'll take you there -->
  <label for="destination">What's your favorite blog?</label>
  <select name="destination" id="destination">
    <option value="" selected>- Select a blog -</option>
    <option value="">BoingBoing</option>
    <option value="">Giant Robots</option>
    <option value="">Kottke</option>
  <button type="submit">Submit</button>

// when destination has its value changed
$("#destination").on("change", function(){
  // set the value of the hidden redirect parameter
  // to the  selected option's value.

Didn't find what you were looking for?