I have followed the instructions from this post. http://www.gravityhelp.com/forums/topic/terms-of-conditions?replies=13#post-7442
Link to form: http://spmmemphis.com/customer-review-app/yelp-review/
Note: I have four selections (poor, fair, good, excellent) but for the sake of getting this to work I have only used two selections (poor, good) but will want to use all four selections when completed (figured I may need an array but don't know how to do that). I will also have four forms like this, one for each review site (Yelp, Google, Yahoo, Bing), unless you can suggest an easier way.
From GF post...
You'll want to create a totally new file for the page template.. I called mine template_redirect.php in the root of the theme directory. Open that file, and add this..
This is the code used in my file named, template_redirect.php loaded to my themes directory.
// redirect form based on the rating value passed in querystring
$rating = $_GET['rating'];
// if poor redirect to the following page
// if good redirect to the following page
Template Name: form terms redirect
Since we're using this simply for a redirect, we don't need anything else on the page. Of course, you'll configure the URL's to your actual destination pages.
Next, you'll want to go to "add pages", create a new page then select the "form terms redirect" as the page template. Name the page "redirect" then save everything.
Next, go to your form, click on the form settings at the top of the page, then the confirmation tab. Select the "redirect" option under the confirmation message heading. There you will put in the URL of the page you want to redirect the form to.. in this case, to the page you just created so something like.. "http://www.yourdomain.com/redirect/"
Then, you'll need to check the "Pass Field Data Via Query String" option and build your query string. You have to manually add the first portion "agree=" then select from the drop down list directly above that field and find the "agree" field in your form, click on that and it will insert the proper token to populate the query string.
Link to sample of the form settings -- http://spmmemphis.com/customer-review-app/sample-gravity-forms-settings/
Save the form settings, then go test your form. The form should redirect to the confirmation page you created, then based on the agree field value passed to it, will redirect to whatever page you want from there.
Now i get this error message: Warning: Header may not contain more than a single header, new line detected. in /home/spmmemph/public_html/wp-content/plugins/gravityforms/form_display.php on line 88
Researching that now.
Posted 10 years ago on Saturday April 20, 2013 | Permalink