Extended example
This example expands on the original example, and adds validation to our form.
<form name='valForm' method='post'>
<label for='name'>Name</label><input name='name' id='name' type='text' value=''/><br/>
<label for='email'>Email</label><input name='email' id='email' type='text' value=''/><br/>
<label for='dob'>Date of birth</label><input name='dob' id='dob' type='text' size='30' value=''/><br/>
<button type='submit'>Save</button>
</form>
<label for='name'>Name</label><input name='name' id='name' type='text' value=''/><br/>
<label for='email'>Email</label><input name='email' id='email' type='text' value=''/><br/>
<label for='dob'>Date of birth</label><input name='dob' id='dob' type='text' size='30' value=''/><br/>
<button type='submit'>Save</button>
</form>
pax.load.onloaded( function() {
pax.widget.datePick.init( $('dob'), { dateFormat: 'd-m-Y', validate: true } );
pax.validate.initValidation( 'valForm', {
'email': { mask: 'email' },
'name': { mask: 'notEmpty' }
} );
} );
pax.widget.datePick.init( $('dob'), { dateFormat: 'd-m-Y', validate: true } );
pax.validate.initValidation( 'valForm', {
'email': { mask: 'email' },
'name': { mask: 'notEmpty' }
} );
} );
The example above is rendered here: