Another very quick one here for anyone who would like to re-direct to a different template upon a successful comment submission.
Usage :
{exp:comment:form preview="{my_template_group}/comment_preview" return_url="template_group/template_name"}
{!-- Comment form goes here --}
{/exp:comment:form}
That’s it for now! Would love to hear from anyone if I’ve done anything silly on this one.
Best wishes,
Mark
I am using solspace’s rating module but the more good stuff I see like this then more I think hmmmm but hey I can use it for my other sites:) Mark this looks really useful thanks!
Thanks for the kind words, much appreciated. Hope it is of use to people and I just hope I haven’t done anything silly by using this method. The extension itself is exceptionally simple and I was hoping to find a way to add in a new parameter to the comment form tag without having to hack any core files although I’m not sure if that’s going to be possible or not.
Anyway hope it’s of some use.
N.B. Just updated the usage above as I had accidentally left the return_url=”” form field as a text type instead of a hidden field
Best wishes,
Mark
A very quick update on this. Thanks to Silenz I have now updated the extension so you now have a return_url=”template_group/template_name” parameter in the comment form tag instead of having to use a hidden field.
New version and instructions are in the first post in this thread.
Best wishes,
Mark
I was just thinking about whether I actually have a use for this extension myself.
In that case I think I will have to charge you for it 😉
Just kidding as I couldn’t have possibly made this without your help.
During evaluation I realized that you should probably return the unaltered hidden fields in case no return_url parameter exists.
New version now attached to top post. Hopefully should work correctly now and return the standard fields if no return_url=”“ parameter value is set or the parameter isn’t present in the tag.
Thanks again for your help on this one.
Best wishes,
Mark
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.