checkbox and select.
Class for multiple-choice type HTML elements. Has the same return value, regardless of skin type (checkbox or select).
- See also
- Depage\HtmlForm\Elements\Single
-
Depage\HtmlForm\Elements\Boolean
Usage
<?php
$form->addMultiple('listOne', array(
'label' => 'Spoken languages',
'list' => array(
'en' => 'English',
'es' => 'Spanish',
'fr' => 'French',
),
));
$form->addMultiple('listTwo', array(
'label' => 'Spoken languages',
'skin' => 'select',
'list' => array(
'en' => 'English',
'es' => 'Spanish',
'fr' => 'French',
),
));
$form->process();
echo ($form);
Definition at line 59 of file Multiple.php.
|
| | __construct (string $name, array $parameters, object $form) |
| | multiple class constructor
|
| | __toString () |
| | Renders element to HTML.
|
| | validate () |
| | Validates input element.
|
| | invalidate () |
| | Invalidates input.
|
| | isEmpty () |
| | says wether the element value is empty
|
| | setValue (mixed $newValue) |
| | set the input element value
|
| | getValue () |
| | Returns the current input elements' value.
|
| | setLabel (string $label) |
| | set the label of the input
|
| | getLabel () |
| | Returns the current input elements' label.
|
| | setErrorMessage (string $message) |
| | setErrorMessage
|
| | getErrorMessage () |
| | getErrorMessage
|
| | clearValue () |
| | resets the value to null
|
| | setDefaultValue (mixed $newDefaultValue) |
| | set the initial input element value
|
| | getDefaultValue () |
| | gets the initial input element value
|
| | setAutofocus (bool $autofocus=true) |
| | Sets the HTML autofocus-attribute of the current input element.
|
| | setRequired (bool $required=true) |
| | Sets the HTML required-attribute of the current input element.
|
| | __construct (string $name, array $parameters, object|null $form) |
| | element class constructor
|
| | __call (string $function, array $arguments) |
| | HTML escaping.
|
| | setDisabled (bool $disabled=true) |
| | Sets the HTML disabled-attribute of the current input element.
|
| | getDisabled () |
| | Gets if input is currently disabled.
|
| | getName () |
| | Returns the element name.
|
|
| | setDefaults () |
| | collects initial values across subclasses.
|
| | htmlList (array|null $options=null, array|null $value=null) |
| | HTML option list rendering.
|
| | htmlInputAttributes () |
| | Returns string of HTML attributes for input element.
|
| | typeCastValue () |
| | Converts value to element specific type.
|
| | validatorCall () |
| | custom validator call hook
|
| | htmlClasses () |
| | Returns string of the elements' HTML-classes, separated by spaces.
|
| | htmlMarker () |
| | Returns elements' required-indicator.
|
| | htmlDataAttributes () |
| | Returns dataAttr escaped as attribute string.
|
| | htmlWrapperAttributes () |
| | Returns string of HTML attributes for element wrapper paragraph.
|
| | htmlValue () |
| | Returns HTML-rendered element value.
|
| | htmlErrorMessage () |
| | Returns HTML-rendered error message.
|
| | htmlHelpMessage () |
| | Returns HTML-rendered helpMessage.
|
| | log (string $argument, string $type=null) |
| | error & warning logger
|
| | htmlEscape (array|string $options=[]) |
| | Escapes HTML in strings and arrays of strings.
|
|
| | $list = [] |
| | Contains list of selectable options.
|
| | $listHtml = [] |
| | Contains list of html prerendered options.
|
| | $skin = 'radio' |
| | HTML skin type (checkbox or select).
|
| | $maxItems = null |
| | maxItems
|
| | $type |
| | Input element type - HTML input type attribute.
|
| | $label |
| | Input element - HTML label.
|
| | $labelHtml |
| | Input element - HTML label in html format.
|
| | $title |
| | Input element - HTML title.
|
| | $lang |
| | Input element - lang.
|
| | $defaultValue |
| | Input element - default value.
|
| | $marker |
| | Input element - HTML marker text that marks required fields.
|
| | $required |
| | True if the input element is required to hold a value to be valid.
|
| | $readonly |
| | wether a input element will be readonly
|
| | $formName |
| | Name of the parent HTML form.
|
| | $value = null |
| | Input elements's value.
|
| | $validator |
| | Holds validator object reference.
|
| | $class |
| | class for paragraph
|
| | $classes |
| | HTML classes attribute for rendering the input element.
|
| | $autofocus = false |
| | HTML autofocus attribute.
|
| | $autocapitalize |
| | HTML autocapitalize attribute.
|
| | $autocorrect |
| | HTML autocorrect attribute.
|
| | $autocomplete |
| | HTML autocomplete attribute.
|
| | $pattern |
| | HTML pattern attribute.
|
| | $errorMessage |
| | Message that gets displayed in case of invalid input.
|
| | $helpMessage |
| | Extra help message.
|
| | $helpMessageHtml |
| | Extra help message in html format.
|
| | $name |
| | Element name.
|
| | $validated = false |
| | True if the element has been validated before.
|
| | $log |
| | Log object reference.
|
| | $defaults = [] |
| | holds default values for element attributes
|
| | $disabled = false |
| | wether a input element will be disabled
|
| | $class |
| | CSS class of the container element.
|