Skip to content

Cannot override Success Behavior at template-level #465

Discussion options

You must be logged in to vote

Hi @chrismlusk,

What it means when it says "can be overridden at template-level" is that the behavior itself can be overridden through other means.

For example, adding a returnUrl parameter in the template (when not using AJAX) will force the form to redirect to that URL instead of staying on the same page and showing success if that is what it is set in CP):

{{ form.renderTag({returnUrl: "contact/success"}) }}

If using AJAX and you have the form set to stay on the same page upon success or set to None with a return URL configured in form builder, it will also redirect to a URL if you add the following JS override

<html>
<head>
</head>
<body>

    {{ craft.freeform.form("myFormHandle").r…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by chrismlusk
Comment options

You must be logged in to vote
1 reply
@kjmartens
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #462 on September 29, 2022 19:21.