Personal tools
You are here: Home Documentation Tutorials Customizing PloneFormGen Setting a Custom Redirect
Document Actions

Setting a Custom Redirect

PloneFormGen normally displays the Thank You Page after someone submits a form. If you'd rather point them to a URL, you can do so by setting a custom redirect in the Form Folder.

For some forms you build, you may wish to direct your site visitor to a specified URL instead of the Thank You Page after they submit the form. In order to do this, you must employ an override on the Form Folder.

Edit the Form Folder then click on the Overrides tab. Notice the first field at the top, labeled Custom Success Action.

form-folder-overrides.gif
If you read through the help text for the field you will notice that this field requires CMFFormController actions. However the help text does provide an example for setting a custom redirect.

Paste the following code into the field:

redirect_to:string:thanks-page

Where 'thanks-page' is the Short Name of the object you wish to point to after the form has been submitted. Keep in mind that simply indicating the short name may not be enough information - the string is looking for a relative URL, that is, a web address defined in relation to where the Form Folder is in your site's file structure. You can either use the "../../" method or use an absolute URL (i.e. http://www.mysite.org/forms/thanks-page).

 

 
by samk last modified 2008-11-10 13:50 All content on this site is licensed under a Creative Commons License.
Still Stumped?
If you've still got questions about Plone, here are your best bets for finding out more:
 

All content in this site distributed under the Creative Commons "Attribution-NonCommercial-ShareAlike" license unless otherwise noted.

Powered by Plone CMS, the Open Source Content Management System