A simplified version of what I'm trying to do:
What happens is that the error message displays, the email event does not trigger, but I can't figure out how to prevent the hidden subform becoming visible. Ideally, I'd like to be able to test the validation check and branch depending on the result. However, it seems that an execValidate doesn't return a code so placing it in a pre-submit event has no effect.
I could add code to manually test the field for null, but in the real world, this would result in dozens of extra lines of code and I was hoping to avoid that.
Button click event:
RealSubmit.event__click.submit.target="mailto:user@isp.com?subject=Test";
RealSubmit.execEvent("click");
sfHidden.presence = "visible";
Can anyone suggest where I might place the .presence line to accomplish what I want?
Thanks, Steve
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You would need to wrap the script in an if statement that checks if the mandatory fields have been completed:
if (form1.execValidate() == true) {
RealSubmit.event__click.submit.target="mailto:user@isp.com?subject=Test";
RealSubmit.execEvent("click");
sfHidden.presence = "visible";
}
Should work,
Niall
Views
Replies
Total Likes
Hi,
You would need to wrap the script in an if statement that checks if the mandatory fields have been completed:
if (form1.execValidate() == true) {
RealSubmit.event__click.submit.target="mailto:user@isp.com?subject=Test";
RealSubmit.execEvent("click");
sfHidden.presence = "visible";
}
Should work,
Niall
Views
Replies
Total Likes
Does indeed. Thanks so much for your prompt response!
Steve
Views
Replies
Total Likes
Views
Likes
Replies