Example form is linked to a database table, but won't be saved in this example.

When you submit the form, the value is presented with debug_dump(), so strings are quoted and array values listed.

: //
: - Stop the submitted form from bring processed
: - Don't process the form, redirect to another page (e.g. login after session timeout), and remember the values for when they return.

or back to examples


<?php
	$field = new form_field_date($form, 'Date');
	$field->db_field_set('date');
	$field->autocomplete_set('bday'); // Special value, according to HTML 5.1 spec
	$field->invalid_error_set('Your date does not appear to be correct.');
	$field->required_error_set('Your date is required.');
	$field->min_date_set('Your date has to be after 2000.', strtotime('2000-01-01'));
	$field->max_date_set('Your date cannot be set in the future.', time());
?>