This code successfully displays the Message, and stops the Form submit:
I tried to add in an 'if' condition:
I'm trying to only show the MESSAGE if that Form field (set_p_v) when entry is 0, but the Message does not display with that code.
Can you assist me to have the "if" statement succeed?
Any help is appreciated
JavaScript:
beforeSend: function() {
Snackbar.show({text: 'MESSAGE-2'});
return false;
I tried to add in an 'if' condition:
JavaScript:
beforeSend: function() {
if (empty($error) && $_POST['set_p_v'] == 0) {
Snackbar.show({text: 'MESSAGE-2'});
return false;
}
I'm trying to only show the MESSAGE if that Form field (set_p_v) when entry is 0, but the Message does not display with that code.
Can you assist me to have the "if" statement succeed?
Any help is appreciated