Lines Matching defs:value
125 * Adds a name/value pair as a hidden field.
126 * The value of the field (but not the name) will be passed to
130 * @param string $value Field value. If null, remove a previously added field.
134 public function addHidden($name, $value)
136 if (is_null($value))
138 else $this->_hidden[$name] = $value;
230 * Gets the position of the first element with a matching attribute value.
233 * @param string $value Attribute value.
238 public function findElementByAttribute($name, $value)
241 if (is_array($elem) && isset($elem[$name]) && $elem[$name] == $value)
284 foreach ($this->_hidden as $name => $value)
285 $form .= form_hidden(array('name' => $name, 'value' => $value));
320 * @param array $entries An array of entries $value => $caption
328 $value = (array_key_exists($INPUT->post->str($name), $entries)) ?
331 $data = ($value === $val) ? array('checked' => 'checked') : array();
413 * A title will automatically be generated using the value and
418 * @param string $value (optional) Displayed label. Uses $act if not provided.
424 function form_makeButton($type, $act, $value = '', $attrs = array())
426 if ($value == '') $value = $act;
428 'value' => $value);
430 $attrs['title'] = $value . ' [' . strtoupper($attrs['accesskey']) . ']';
443 * @param string $value (optional) Default value.
454 function form_makeField($type, $name, $value = '', $label = null, $id = '', $class = '', $attrs = array())
458 'type' => $type, 'id' => $id, 'name' => $name, 'value' => $value);
473 * @param string $value
481 function form_makeFieldRight($type, $name, $value = '', $label = null, $id = '', $class = '', $attrs = array())
485 'type' => $type, 'id' => $id, 'name' => $name, 'value' => $value);
498 * @param string $value
506 function form_makeTextField($name, $value = '', $label = null, $id = '', $class = '', $attrs = array())
510 'id' => $id, 'name' => $name, 'value' => $value, 'class' => 'edit');
518 * Password elements have no default value, for obvious reasons.
567 * If $value is an array, a hidden field with the same name and the value
568 * $value[1] is constructed as well.
574 * @param string $value
582 function form_makeCheckboxField($name, $value = '1', $label = null, $id = '', $class = '', $attrs = array())
585 if (is_null($value) || $value == '') $value = '0';
587 'id' => $id, 'name' => $name, 'value' => $value);
600 * @param string $value
608 function form_makeRadioField($name, $value = '1', $label = null, $id = '', $class = '', $attrs = array())
611 if (is_null($value) || $value == '') $value = '0';
613 'id' => $id, 'name' => $name, 'value' => $value);
621 * The list of values can be strings, arrays of (value,text),
623 * An item is selected by supplying its value or integer index.
630 * @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
632 * @param string|int $selected default selected value, string or index number
669 * The list of values can be strings, arrays of (value,text),
671 * Items are selected by supplying its value or an array of values.
676 * @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
678 * @param array|string $selected value or array of values of the items that need to be selected
807 * Uses only 'name' and 'value' attributes.
817 return '<input type="hidden" name="' . $attrs['name'] . '" value="' . formText($attrs['value']) . '" />';
858 $value = $attrs['value'];
859 unset($attrs['value']);
860 return '<button ' . $p . buildAttributes($attrs, true) . '>' . $value . '</button>';
1004 * If value is an array, a hidden field with the same name and the value
1005 * $attrs['value'][1] is constructed as well.
1020 if (is_array($attrs['value'])) {
1022 . ' value="' . hsc($attrs['value'][1]) . '" />';
1023 $attrs['value'] = $attrs['value'][0];
1063 * _options : Array of (value,text,selected) for the menu.
1064 * Text can be omitted. Text and value are passed to formText()
1088 @list($value,$text,$select) = $attrs['_options'][$n];
1091 $p .= ' value="' . formText($value) . '"';
1092 else $text = $value;
1112 * _options : Array of (value,text,selected) for the list.
1113 * Text can be omitted. Text and value are passed to formText()
1132 @list($value, $text, $select, $disabled) = $opt;
1134 if (is_null($text)) $text = $value;
1135 $p .= ' value="' . formText($value) . '"';