Program_Root/tag_utils/form_utils.inc

Description

This file contains various helper functions for building forms and form elements.

$Id: _tag_utils_form_utils_inc.html,v 1.34 2003/08/01 01:37:37 hemna Exp $

Functions
form_active_checkbox (line 327)

build/render an input tag of type CHECKBOX with onClick javaScript selection

  • return:

    a container object

  • author:

    Suren Markossian

object returns form_active_checkbox (string $name, [string $text = NULL], [string $value = NULL], [string $class = NULL], [mixed $onClick = NULL], [mixed $disabled = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • string $text:

    - text label for the checkbox

  • string $class:

    class - CSS class of the text

form_active_radio (line 234)

build/render an set of radio buttons with onClick javaScript selection

  • return:

    a container object

  • author:

    Suren Markossian

object returns form_active_radio (string $name, array $list, string $value, [bool $line_break = TRUE], [array $attribs = FALSE])
  • string $name:

    - the name of the input tag.

  • array $list:

    - an array of text label = value pairs

  • string $value:

    - the default value (the one that will be checked)

  • bool $line_break:

    - specify whether to put a line break after each radio button

  • array $attribs:

    - specify addionnal attribs for each value

form_button (line 143)

build/render an input tag of type button

  • return:

    either returns an input object (default) or raw html.

mixed form_button (string $name, [string $value = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_checkbox (line 304)

build/render an input tag of type CHECKBOX

  • return:

    either returns an input object (default) or raw html.

mixed form_checkbox (string $name, [string $value = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_close (line 60)

render a form close tag

  • return:

    - the </form> tag.

string form_close (mixed $indent_level)
form_file (line 386)

build/render an html tag of file

  • return:

    either returns an input object (default) or raw html.

mixed form_file (string $name, [string $value = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_hidden (line 283)

build/render an input tag of type hidden

  • return:

    either returns an input object (default) or raw html.

mixed form_hidden (string $name, [string $value = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_image (line 187)

build/render an input tag of type image

  • return:

    either returns an input object (default) or raw html.

mixed form_image (string $name, [string $value = NULL], string $src, [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • string $src:

    - the image src

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_open (line 49)

render an form open tag only.

This is usefull for forms that are inside a table. you would render the form tag first, then the table with the form fields.

  • return:

    returns the raw form tag.

string form_open (string $name, string $action, [string $method = "GET"], [string $attributes = array()], mixed $indent_level)
  • string $name:

    - name attribute of the form tag.

  • string $action:

    - the form action.

  • string $method:

    - form method

  • string $attributes:

    - any extra name='value' attributes for the form tag.

form_password (line 113)

build/render an input tag of type password

  • return:

    either returns an input object (default) or raw html.

mixed form_password (string $name, [string $value = NULL], [int $size = NULL], [int $maxlength = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • int $size:

    - the size in characters of the text tag

  • int $maxlength:

    - the maximum @ of characters for the field

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_radio (line 210)

build/render an input tag of type radio

  • return:

    either returns an input object (default) or raw html.

mixed form_radio (string $name, [string $value = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_select (line 449)

Build a select tag with all of its option tags

  • return:

    SELECTtag object.

  • author:

    Walt A. Boring IV

a form_select (string $name, [array $options = array()], [mixed $selected = ""], [boolean $multiple_flag = FALSE], [array $attribs = false])
  • string $name:

    - name of the select.

  • array $options:

    - an array of name value pairs for the options. the format is array( "LABEL" => VALUE ); each <option value="VALUE"> LABEL </option> ie array( "test" => "foo") would give an option of <option value="foo"> test </option>

  • mixed $selected:

    - This can be either a string or an array. If its a string then, it will be the selected option value <option value="foo" SELECTED>foo</option> If it is an array, then all of the option values will be marked as SELECTED. This only makes sense to do if the multiple_flag is true.

  • boolean $multiple_flag:

    - is this a multiple selection select box?

  • array $attribs:

    - additionnal attributes to the select tag

form_submit (line 165)

build/render an input tag of type submit

  • return:

    either returns an input object (default) or raw html.

mixed form_submit (string $name, [string $value = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_text (line 80)

build/render an input tag of type text

  • return:

    either returns an input object (default) or raw html.

mixed form_text (string $name, [string $value = NULL], [int $size = NULL], [int $maxlength = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the input tag.

  • string $value:

    - the value of the tag

  • int $size:

    - the size in characters of the text tag

  • int $maxlength:

    - the maximum @ of characters for the field

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

form_textarea (line 413)

build a textarea tag with name and attributes.

  • return:

    object.

  • author:

    Walt A. Boring

TEXTAREAtag form_textarea (string $name, [string $value = NULL], [array $attributes = array()], [boolean $render_flag = FALSE])
  • string $name:

    - the name of the textarea tag.

  • string $value:

    - data to display in the textarea.

  • array $attributes:

    - any extra name='value' pair attributes

  • boolean $render_flag:

    - render an object (FALSE) or raw html (TRUE);

html_form (line 28)

render an form open tag only.

This is usefull for forms that are inside a table. you would render the form tag first, then the table with the form fields.

  • return:

    returns the raw form tag.

string html_form (string $name, string $action, [string $method = "GET"], [string $attributes = array()])
  • string $name:

    - name attribute of the form tag.

  • string $action:

    - the form action.

  • string $method:

    - form method

  • string $attributes:

    - any extra name='value' attributes for the form tag.

Documention generated on Thu, 31 Jul 2003 18:32:47 -0700 by phpDocumentor 1.2.0