I have an Freeform entry field {{ pageForm }}
where the user can select a form to display on the page.
And then in the page template I load the form in to the page using {{ entry.pageForm.render() }}
. Cool.
I also want them to be able to choose the return URL from an Entries field e.g {{ entry.formThankyouUrl }}
. Is there any way to pass that formThankyouUrl to the renderTag? E.g the below setup would be ideal..
Page template:
{% if entry.formPageForm|length %}
{% set thankyouUrl = row.formThankYou.one() ?? null %}
{{ entry.formPageForm.render() }}
{% endif %}
Form template:
{{ form.renderTag({
returnUrl: thankyouUrl
}) }}
The reason I ask is that the default Return URL functionality in freeform is quite limited in that you have to paste in the URL, would be good to select it form a entries dropdown
Thanks