| [ Index ] |
|
Code source de CakePHP 1.1.13.4450 |
[Code source] [Imprimer] [Statistiques]
Automatic generation of HTML FORMs from given data. Used for scaffolding.
| Copyright: | Copyright 2005-2007, Cake Software Foundation, Inc. |
| License: | http://www.opensource.org/licenses/mit-license.php The MIT License |
| Version: | $Revision: 4409 $ |
| Poids: | 491 lignes (18 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
FormHelper:: (14 méthodes):
isFieldError()
labelTag()
divTag()
pTag()
generateInputDiv()
generateCheckboxDiv()
generateDate()
generateTime()
generateYear()
generateDateTime()
generateAreaDiv()
generateSelectDiv()
generateSubmitDiv()
generateFields()
Classe: FormHelper - X-Ref
Form helper library.| isFieldError($field) X-Ref |
| Returns a formatted error message for given FORM field, NULL if no errors. param: string $field This should be "Modelname/fieldname" return: bool If there are errors this method returns true, else false. |
| labelTag($tagName, $text) X-Ref |
| Returns a formatted LABEL element for HTML FORMs. param: string $tagName This should be "Modelname/fieldname" param: string $text Text that will appear in the label field. return: string The formatted LABEL element |
| divTag($class, $text) X-Ref |
| Returns a formatted DIV tag for HTML FORMs. param: string $class CSS class name of the div element. param: string $text String content that will appear inside the div element. return: string The formatted DIV element |
| pTag($class, $text) X-Ref |
| Returns a formatted P tag with class for HTML FORMs. param: string $class CSS class name of the p element. param: string $text Text that will appear inside the p element. return: string The formatted P element |
| generateInputDiv($tagName, $prompt, $required = false, $errorMsg = null, $size = 20, $htmlOptions = null) X-Ref |
| Returns a formatted INPUT tag for HTML FORMs. param: string $tagName This should be "Modelname/fieldname" param: string $prompt Text that will appear in the label field. param: bool $required True if this field is a required field. param: string $errorMsg Text that will appear if an error has occurred. param: int $size Size attribute for INPUT element param: array $htmlOptions HTML options array. return: string The formatted INPUT element, with a label and wrapped in a div. |
| generateCheckboxDiv($tagName, $prompt, $required = false, $errorMsg = null, $htmlOptions = null) X-Ref |
| Returns a formatted CHECKBOX tag inside a DIV for HTML FORMs. param: string $tagName This should be "Modelname/fieldname" param: string $prompt Text that will appear in the label field. param: bool $required True if this field is a required field. param: string $errorMsg Text that will appear if an error has occurred. param: array $htmlOptions HTML options array. return: string The formatted checkbox div |
| generateDate($tagName, $prompt, $required = false, $errorMsg = null, $size = 20, $htmlOptions = null, $selected = null) X-Ref |
| Returns a formatted date option element for HTML FORMs. param: string $tagName This should be "Modelname/fieldname" param: string $prompt Text that will appear in the label field. param: bool $required True if this field is a required field. param: string $errorMsg Text that will appear if an error has occurred. param: int $size Not used. param: array $htmlOptions HTML options array return: string Date option wrapped in a div. |
| generateTime($tagName, $prompt, $required = false, $errorMsg = null, $size = 20, $htmlOptions = null, $selected = null) X-Ref |
| Returns a formatted date option element for HTML FORMs. param: string $tagName This should be "Modelname/fieldname" param: string $prompt Text that will appear in the label field. param: bool $required True if this field is a required field. param: string $errorMsg Text that will appear if an error has occurred. param: int $size Not used. param: array $htmlOptions HTML options array return: string Date option wrapped in a div. |
| generateYear($tagName, $prompt, $required = false, $errorMsg = null, $size = 20, $htmlOptions = null, $selected = null) X-Ref |
| Returns a formatted year option element for HTML FORMs. param: string $tagName This should be "Modelname/fieldname" param: string $prompt Text that will appear in the label field. param: bool $required True if this field is a required field. param: string $errorMsg Text that will appear if an error has occurred. param: int $size Not used. param: array $htmlOptions HTML options array return: string Date option wrapped in a div. |
| generateDateTime($tagName, $prompt, $required = false, $errorMsg = null, $size = 20, $htmlOptions = null, $selected = null) X-Ref |
| Returns a formatted datetime option element for HTML FORMs. param: string $tagName This should be "Modelname/fieldname" param: string $prompt Text that will appear in the label field. param: bool $required True if this field is required. param: string $errorMsg Text that will appear if an error has occurred. param: int $size Not used. param: array $htmlOptions HTML options array param: array $selected Selected index in the dateTimeOption tag. return: string The formatted datetime option element wrapped in a div. |
| generateAreaDiv($tagName, $prompt, $required = false, $errorMsg = null, $cols = 60, $rows = 10, $htmlOptions = null) X-Ref |
| Returns a formatted TEXTAREA inside a DIV for use with HTML forms. param: string $tagName This should be "Modelname/fieldname" param: string $prompt Text that will appear in the label field. param: boolean $required True if this field is required. param: string $errorMsg ext that will appear if an error has occurred. param: integer $cols Number of columns. param: integer $rows Number of rows. param: array $htmlOptions HTML options array. return: string The formatted TEXTAREA element, wrapped in a div. |
| generateSelectDiv($tagName, $prompt, $options, $selected = null, $selectAttr = null, $optionAttr = null, $required = false, $errorMsg = null) X-Ref |
| Returns a formatted SELECT tag for HTML FORMs. param: string $tagName This should be "Modelname/fieldname" param: string $prompt Text that will appear in the label field param: array $options Options to be contained in SELECT element param: string $selected Currently selected item param: array $selectAttr Array of HTML attributes for the SELECT element param: array $optionAttr Array of HTML attributes for the OPTION elements param: bool $required True if this field is required param: string $errorMsg Text that will appear if an error has occurred return: string The formatted INPUT element, wrapped in a div |
| generateSubmitDiv($displayText, $htmlOptions = null) X-Ref |
| Returns a formatted submit widget for HTML FORMs. param: string $displayText Text that will appear on the widget param: array $htmlOptions HTML options array return: string The formatted submit widget |
| generateFields($fields, $readOnly = false) X-Ref |
| Generates a form to go onto a HtmlHelper object. param: array $fields An array of form field definitions param: boolean $readOnly True if the form should be rendered as READONLY return: string The completed form specified by the $fields parameter |
| Généré le : Sun Feb 25 19:27:47 2007 | par Balluche grâce à PHPXref 0.7 |