ValidForm Builder

Easy and safe XHTML 1.0 strict forms with validation!

Contents

VF_MultiField→addField

VF_MultiField→addField — Adds a new field object to the current object


Description

addField (string $name, int $type[, array $validationRules[, array $errorHandlers[, array $meta[, bool $justRender]]]]);

Adds a new field object to the current object.

Parameters

  • name
    Name (and ID) of the new field
  • type
    See Predefined Constants for all possible field types.
  • validationRules
    See: Validation Rules for all possible validation rules.
  • errorHandlers
    See: Error Handlers for all possible error handlers.
  • meta
    See: Meta for all possible meta data.

Return values

Returns type dependent one of these objects:

case VFORM_STRING:
case VFORM_WORD:
case VFORM_EMAIL:
case VFORM_SIMPLEURL:
case VFORM_CUSTOM:
case VFORM_CURRENCY:
case VFORM_DATE:
case VFORM_NUMERIC:
case VFORM_INTEGER:

case VFORM_PASSWORD:

case VFORM_CAPTCHA:

case VFORM_TEXT:

case VFORM_FILE:

case VFORM_BOOLEAN:

case VFORM_RADIO_LIST:
case VFORM_CHECK_LIST:

case VFORM_SELECT_LIST:

default:

Examples

Check out the ValidForm class for examples.