Class DateInput

(line 40)

Description

RocketSledObject
   |
   --FormInput
      |
      --DateInput

Located in File: /rs/packages/sys/display/form/date_input.class.php

This is a useful class for gathering date information from the user without requiring them to enter it in a difficult format. Far too often people are required to enter a date in like '2006-06-06'.

The <date-input> field is a 'meta-widget' that in fact prints out three different HTML inputs, one each for day, month and year. This is integrated into the automated form validation engine that means you are able to use things like GREATER, EQUALS etc. with date values.

When putting in form validation values for dates, you can simply use the GNU Date Input Formats, as discussed here:

http://www.gnu.org/software/tar/manual/html_node/tar_109.html

An example of using a date input value with the format dd/mm/yyyy that is between 18 years ago and today:

<date-input name="dob"> <validation type="GREATER" value="18 years ago"> <error-message>You must be at under 18 years old</error-message> </valdation> <validation type="LESS" value="today"> <error-message>I'm pretty sure you weren't born today</error-message> </valdation> <date-input>

See FormValidationRequirement for more details on how to use the automated form validation.



Class Variables

Summary:

Class Constants

Summary:

Method Detail

Summary:
DateInput DateInput (mixed $name, mixed $class, mixed $id, [mixed $stamp = ''], [ $format = ''])
void day ()
void getTemplateData ()
void month ()
void setDate ( $value)
void setValue ( $value)
void toHTML ()
void value ()
void year ()

Constructor DateInput (line 81)

DateInput DateInput( mixed $name, mixed $class, mixed $id, [mixed $stamp = ''], [ $format = ''])

Create a new DateInput object

Parameters

  • $format:

Info

Method day (line 142)

void day( )

Info

Method getTemplateData (line 165)

void getTemplateData( )

Overrides : FormInput::getTemplateData() parent method not documented

Render the DateInput to the screen according to the proscribed format

Info

  • access - public

Method month (line 124)

void month( )

Info

Method setDate (line 114)

void setDate( $value)

Parameters

  • $value:

Info

Method setValue (line 119)

void setValue( $value)

Overrides : FormInput::setValue() parent method not documented

Parameters

  • $value:

Info

Method toHTML (line 173)

void toHTML( )

Overrides : FormInput::toHTML() parent method not documented

Info

Method value (line 151)

void value( )

Overrides : FormInput::value() parent method not documented

Info

Method year (line 133)

void year( )

Info

Inherited Variables

Inherited Class Variable Summary

Inherited From Class RocketSledObject

RocketSledObject::$display_info_values - An array of display information values

Inherited Methods

Inherited Method Summary

Inherited From Class FormInput

FormInput::FormInput() - Create a new FormInput object

FormInput::addOption() - Add an option by an already constructed array

FormInput::addOptions() - Add options as an associative array

FormInput::allowsOptions() - Return whether or not this object is allowed options

FormInput::getTemplateData() -

FormInput::name() -

FormInput::setAllowsOptions() - Set whether or not this object is allowed options

FormInput::setOptions() - Set the options array using an associative array

FormInput::setValue() -

FormInput::setValueOverride() -

FormInput::toHTML() -

FormInput::toString() -

FormInput::value() -

FormInput::valueOverride() -


Inherited From Class RocketSledObject

RocketSledObject::RocketSledObject() - Create a new RocketSledObject

RocketSledObject::displayInfoValue() - Retrieve some display information for this object

RocketSledObject::displayInfoValues() - Return all display info values

RocketSledObject::getClass() - Return the class of the current object

RocketSledObject::offsetExists() -

RocketSledObject::offsetExists() - Implement the offsetExists method proscribed by the

RocketSledObject::offsetGet() -

RocketSledObject::offsetGet() - Implement the offsetGet method proscribed by the

RocketSledObject::offsetSet() -

RocketSledObject::offsetSet() - Implement the offsetSet method proscribed by the

RocketSledObject::offsetUnset() -

RocketSledObject::offsetUnset() - Implement the offsetUnset method proscribed by the

RocketSledObject::setDisplayInfoValue() - Store some display information for this object

RocketSledObject::setDisplayInfoValues() - Store some display information for this object

RocketSledObject::toString() - Returns a string representation of this object



Documentation generated on Mon, 07 Aug 2006 04:14:08 +1000 by phpDocumentor 1.3.0RC6