Redirect to static page basen on field value
We are happy with the default redirects and the ability to redirect to the edit form after creation of a new form. Next, we want to, on save, test a field value and based on that value redirect to different lists view, a static URL. I hope that makes sense.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Sure, just modify the snippet below accordingly to your needs:
Code: Select all
fd.onsubmit(function() {
if (fd.field('Field1').value() == 'XXX') {
// if the Field1 is set to 'XXX', redirect users to URL1 after saving;
fd.sourceFormParam('URL1');
} else {
// redirect users to URL2 otherwise;
fd.sourceFormParam('URL2');
}
return true;
})
-
- Information
-
Who is online
Users browsing this forum: No registered users and 13 guests