Hello
The form starting with the line (in /.../components/com_vmvendor/views/mailcustomer/tmpl/default.php)
Code:
echo ' <form method=POST onsubmit="return validateForm(this);" >
will execute the function validateForm() listed below:
Code:
echo '<script type="text/javascript">
function validateForm(it){
var warning = "'.JText::_('COM_VMVENDOR_VMVENADD_JS_FIXTHIS').' \n";
var same = warning;
if (it.formname.value==""){ warning += " * '.JText::_('COM_VMVENDOR_ASKVENDOR_JS_NAMEREQUIRED').' \n";}
if (it.formemail.value==""){ warning += " * '.JText::_('COM_VMVENDOR_ASKVENDOR_JS_EMAILREQUIRED').' \n";}
if (it.formsubject.value==""){ warning += " * '.JText::_('COM_VMVENDOR_ASKVENDOR_JS_SUBJECTREQUIRED').' \n";}
if (it.formmessage.value==""){ warning += " * '.JText::_('COM_VMVENDOR_ASKVENDOR_JS_MESSAGEREQUIRED').' \n";}
if (warning == same) {;
return true;
}
else
{ alert(warning); return false;}
}</script>';
That is, the form is validated. But, I don't understand how the mail can be sent with this... Because the function only validates the arguments and returns true.