GiuseppeMacri
6 years agoQrew Captain
Save Button with URL Redirect and Warnings
Hi,
I have a form which has a bunch of required fields.
I'd like to create a save button which will redirect the end user to a specific web page that is different from their default page.
If the end user is missing any of these required fields, I would like this button to indicate which field is missing, similiar to QB's native green save buttons.
In testing (code below), i found that the redirect still occurs but the saving does not when a tester saves a form with a missing required field.
Any thoughts?
var text SAVE = "onclick=\"$('#saveButton').click()";
var text REDIRECT = URLRoot() & "db/" & Dbid() & "?a=dbpage&pageID=9";
"<a class='Vibrant Success' & " & $SAVE & "; window.location.href=' "& $REDIRECT &" '\">Submit your request</a>"
------------------------------
GMacri
------------------------------
I have a form which has a bunch of required fields.
I'd like to create a save button which will redirect the end user to a specific web page that is different from their default page.
If the end user is missing any of these required fields, I would like this button to indicate which field is missing, similiar to QB's native green save buttons.
In testing (code below), i found that the redirect still occurs but the saving does not when a tester saves a form with a missing required field.
Any thoughts?
var text SAVE = "onclick=\"$('#saveButton').click()";
var text REDIRECT = URLRoot() & "db/" & Dbid() & "?a=dbpage&pageID=9";
"<a class='Vibrant Success' & " & $SAVE & "; window.location.href=' "& $REDIRECT &" '\">Submit your request</a>"
------------------------------
GMacri
------------------------------