/CORE/system/classes/util/html/FormularHelper.php

Description

BIGACE - a PHP and MySQL based Web CMS.
Copyright (C) Kevin Papst.

BIGACE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

BIGACE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

For further information visit http://www.bigace.de.

Classes
Class Description
FormularHelper This defines some methods to help building HTML Forms.
Functions
createCheckBox (line 211)
void createCheckBox ( $name,  $value,  $checked, [ $disabled = FALSE], [ $id = ""])
  • $name
  • $value
  • $checked
  • $disabled
  • $id
createFileInput (line 229)

Creates an File Input Type with the given Name.

The HTML Elements ID Attribute will be the same as the NAME Attribute.

void createFileInput (the $name)
  • the $name: Name of the HTML Element
createNamedCheckBox (line 200)

Creates a Checkbox with the given Name.

void createNamedCheckBox (the $name, the $value, [if $checked = FALSE], [if $disabled = FALSE], [ $id = ""])
  • the $name: Name of the HTML Checkbox
  • the $value: Value of the HTML Checkbox
  • if $checked: set and TRUE the Checkbox will be checked
  • if $disabled: set and TRUE the Checkbox will be disabled
  • $id
createNamedPasswordField (line 171)
void createNamedPasswordField ( $name,  $value,  $max)
  • $name
  • $value
  • $max
createNamedRadioButton (line 176)
void createNamedRadioButton ( $name,  $value,  $selected, [ $id = ''])
  • $name
  • $value
  • $selected
  • $id
createNamedSelectBox (line 243)

Pass the Values in an Array:

  1. array('foo' => 'bar'will lead to <option value="foo">bar</option>

void createNamedSelectBox (String $name, Array $opt_name_val, [String $sel = NULL], [String $onChange = ''], [boolean $disabled = false], [String $id = ''])
  • String $name: the Name Attribute (name="")
  • Array $opt_name_val: the Array with the Values
  • String $sel: the preselected Value (leave empty for none)
  • String $onChange: the Javascript to be executed "onChange" (leave empty for none)
  • boolean $disabled: whether the Select Box should be disabled or not (default is false)
  • String $id: the ID Attribute (id="")
createNamedTextInputType (line 150)

Creates an HTML Input type "text".

void createNamedTextInputType ( $name,  $value,  $max, [ $disabled = false], [ $size = '35'], [ $id = ''])
  • $name
  • $value
  • $max
  • $disabled
  • $size
  • $id
createOptionTags (line 279)

Creates a String, holding the HTML representation of the Key-Value-pair Array as OPTION Tags for a Select Box.

void createOptionTags ([ $keyValueArray = array()], [ $preselected = NULL])
  • $keyValueArray
  • $preselected
createPasswordField (line 166)
void createPasswordField ( $name,  $value,  $max)
  • $name
  • $value
  • $max
createRadioButton (line 188)
void createRadioButton ( $name,  $value,  $selected, [ $id = ''])
  • $name
  • $value
  • $selected
  • $id
createSelectBox (line 271)

Creates a HTML SELECT Box with the name used in an Array called

  1. data
.

For example, you pass

  1. foo
, it will wrap the name as
  1. <select name="data[foo]">
.

void createSelectBox (String $name, Array $opt_name_val, [String $sel = ''], [String $onChange = ''], [boolean $disabled = false], [String $id = ''])
  • String $name: the Name Attribute (name="")
  • Array $opt_name_val: the Array with the Values
  • String $sel: the preselected Value (leave empty for none)
  • String $onChange: the Javascript to be executed "onChange" (leave empty for none)
  • boolean $disabled: whether the Select Box should be disabled or not (default is false)
  • String $id: the ID Attribute (id="")
createTable (line 44)
void createTable ( $config, [ $cssPre = 'auto'])
  • $config
  • $cssPre
createTextArea (line 216)
void createTextArea ( $name,  $value, [ $rows = '10'], [ $cols = '50'], [ $wrap = ''])
  • $name
  • $value
  • $rows
  • $cols
  • $wrap
createTextInputType (line 161)
void createTextInputType ( $name,  $value,  $max, [ $disabled = false], [ $size = '35'], [ $id = ''])
  • $name
  • $value
  • $max
  • $disabled
  • $size
  • $id

Documentation generated by phpDocumentor 1.3.1