Answered
20 Sep 2016
in reply to
Missing user
Link to this post
Hi Geoff,
You can use JavaScript to identify if there is an error message or validation required message on the form when user clicks submit button. You can set the function below in the "OnClientClick" under advance property of the Submit button and then, you can display message inside a content block that you can initially hide on the form at your desired location. This way you can show one message when there is an error or validation required for one or more fields.
function verifyfields()
{
if($('.sfError').css('display') == 'inline')
{
alert ('There is an issue with your form. Please review');
// or
// $('.CSSNameOfYourContentBlock').css('display','block');
return false;
}
if($('.txtRequired').css('display') == 'inline')
{
alert ('There is an issue with your form. Please review');
// or
// $('.CSSNameOfYourContentBlock').css('display','block');
return false;
}
}