[5] AJAX loading multiple templates #1088
-
Describe the bug or issue you're experiencing Template code (bottom)
Steps to reproduce
Expected behavior Craft & Plugin Info (please complete the following information):
Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @Coysh, You're rendering the |
Beta Was this translation helpful? Give feedback.
-
Thanks @gustavs-gutmanis - that is helpful |
Beta Was this translation helpful? Give feedback.
Hi @Coysh,
You're rendering the
dataProtectionStatement
outside of theform.renderClosingTag
.Freeform's AJAX loads a re-rendered form HTML and scripts after a successful submit and replaces the current
<form>...</form>
with those. Since your data protection block is rendered outside, the initial render remains unreplaced, and the replaced HTML contains another one.