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
	// config::set('form.date_input_order', array('D', 'M', 'Y'));
	// config::set('form.date_format_html', array('separator' => '-'));
	$field = new form_field_date($form, 'Date');
	$field->db_field_set('date');
	$field->invalid_error_set('The date does not appear to be correct.');
	$field->input_order_set(array('Y', 'M', 'D'));
	$field->input_separator_set(' / ');
	$field->format_set(array('separator' => '-'));
	// $field->format_set(array('separator' => '-', 'D' => 'Day', 'M' => 'Month', 'Y' => 'Year'));
	// $field->format_set('Year/Month/Day'); // But this looses the <label> tags.
?>