Redirect based on form values
- This topic has 1 reply, 2 voices, and was last updated 5 years, 3 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Home › Forums › vLooup for SharePoint › Redirect based on form values
I have a form with a filed “SecondaryCategory”. I would like the form to redirect a user to another list, let’s call it “VQ”, when the Secondary category is a specific value.
Do you want a redirect after saving the NewForm or EditForm? – if so, to NewForm of the VQ list, or to an existing item?
Here is an example that redirects to NewForm – just drop it in Custom JS:
function dffs_PreSaveAction() {
var sc = getFieldValue("SecondaryCategory");
if(sc === "your_target_value"){
spjs.dffs.redirect("/sites/Your_Site/Lists/VQ/NewForm.aspx",false);
}
return true;
}
Alexander