I just wanted to share this here, because I scoured the internet for days to figure out an answer to this question, and I hope others find my eventual solution useful.
on_sent_ok: "location = 'http://example.com/';"
But I needed to redirect to a variable URL based on the value of one of the fields on the page. What I ended up using was this, where the ID of the element was “variable-url”:
on_sent_ok: "var url = document.getElementById('variable-url').value; location = url;"
- The topic ‘How to use a field value for a redirect’ is closed to new replies.