The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Sending a user back to their referring URL, on create & update

Labels

This Discussion is public

Notifications

I needed a way to send the user back to the referring url when they both created and updated a form.

I initially used [server param="HTTP_REFERER"] in a field then used that field when selecting 'redirect to URL' in the form's settings. However I found that on updating a form this didn't change the field.

To get around this limitation I added the following script to the field's customise HTML box.

<script>
$(document).ready(function() {
var referrer = document.referrer;
$("#field_y919m").val(referrer);
$("#field_y919m").change();
});
</script>

Just change 'y919m' to the field key of the field you would like to have the referring url added.

Thought it might be good to share.

Regards

Matt

Thanks for sharing Matt. Love your spirit of generosity!

Discussion closed.