<?php
function eFormOnValidate( &$fields, &$vMsg, &$rMsg ){
/*
&$fields - (as reference) an associative array of field and placeholder values.
&$vMsg - (as reference) a numeric array of validation error messages.
&$rMsg - (as Reference) a numeric array of missing required fields.
*/
if($fields['email'] !== $fields['myconfirmemailaddress']) $vMsg[15] = "Different values in Email and Confirm Email fields";
return $vMsg;
}
?>
<tr>
<td height="25" colspan="4">Email Address</td>
</tr>
<tr>
<td colspan="4"><input name="email" type="text" id="Email" size="35" eform="Email:email:1:"></td>
</tr>
<tr>
<td height="25" colspan="4">Confirm Email Address </td>
</tr>
<tr>
<td height="25" colspan="4"><input name="myconfirmemailaddress" type="text" id="Confirm Email" size="35" eform="Confirm Email:email:1::#FUNCTION eFormOnValidate"></td>
</tr>
if I submit form with first field: Email:
[email protected], Confirm Email: (nothing), I get error msg from $vMsg[15].
If I submit form with
[email protected]/
[email protected] or
[email protected]/
[email protected] or (nothing)/
[email protected], i see
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: Missing argument 2 for eformonvalidate()
Error type/ Nr.: Warning - 2
File: ***********/manager/includes/document.parser.class.inc.php(769) : eval()’d code
Line: 2