Is there a possibility to use some validation on the form field in the Frontend users module?
One of the filed has to be numeric and another filed has to check a bank number?
Thanks
Code: Select all
{* registration 1 template *}
{* $title *}
{if isset($message) && $message != ''}
{if isset($error) && $error != ''}
<p><font color="red">{$message}</font></p>
{else}
<p>{$message}</p>
{/if}
{/if}
[color=#FF0000]{literal}
<__script__ type='text/javascript'>
function isNumeric(elem, helperMsg){
var numericExpression = /^[0-9]+$/;
if(elem.value.match(numericExpression)){
return true;
}else{
alert(helperMsg);
elem.focus();
return false;
}
}
</__script>
{/literal}[/color]{$startform}
{if $controlcount > 0}
{foreach from=$controls item=control}
<div class="zrf">
<div class="zrf-label">{if isset($control->hidden)}{$control->hidden}{/if}
{if $control->color != ''}
<font color="{$control->color}">{$control->prompt}{$control->marker}</font>
{else}
{$control->prompt}{$control->marker}
{/if}
</div>
<div class="zrf-input">{$control->control}</div>
</div>
{/foreach}
<br/>
{/if}
{if isset($captcha)}
{$captcha_title}: {$input_captcha}<br />
{$captcha}<br />
{/if}
{$hidden|default:''}{$hidden2|default:''}[color=#FF0000]<input class="cms_submit" name="m92bb4sr_submit" id="m92bb4sr_submit" value="Verstuur" type="submit" onclick="isNumeric(document.getElementById('m92bb4sr_input_kvk_nummer'), 'Numbers Only Please')" />[/color]<br/>
<p>{$msg_sendanotheremail} {$link_sendanotheremail}</p>
{$endform}