Cannot override Success Behavior at template-level #465
-
Describe the bug or issue you're experiencing According to the docs, the Success Behavior setting can be overridden at template-level:
But I am unable to figure out how. I can't find anything in the docs that explains how. Steps to reproduce I've tried some version of the following with both
Craft & Plugin Info (please complete the following information):
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
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
If using AJAX and you have the form set to stay on the same page upon success or set to
If using AJAX and you have the form set to stay on the same page upon success and show a success message if you add the following JS override it'll cancel the success message:
I understand the wording may be confusing though, so we'll adjust it. 🙂 |
Beta Was this translation helpful? Give feedback.
-
You should set this back to "No Effect" or something else backwards compatible. Or give us a config setting. Client has no idea what any of this means and your new Return Behavior (3.13+) is breaking their forms. So we have to troubleshoot and then tell them why, through no fault of their own. Thanks. And your docs are still confusing. That's how we end up here. |
Beta Was this translation helpful? Give feedback.
-
Yes.
I know. That's why we want to configure the default behavior. :) |
Beta Was this translation helpful? Give feedback.
-
I am using Freeform Pro 3.13.29. When adding new forms the "Success behaviour" defaults to "Use return URL" with an empty value. This default means when a user successfully submits a form no success message is shown. The default should either be "No effect" for backwards compatibility. Or should be configurable via template or by setting a default behaviour in the freeform global settings. |
Beta Was this translation helpful? Give feedback.
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):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