Lines Matching refs:value

124      * Adds a name/value pair as a hidden field.
125 * The value of the field (but not the name) will be passed to
129 * @param string $value Field value. If null, remove a previously added field.
133 public function addHidden($name, $value)
135 if (is_null($value))
138 $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();
410 * A title will automatically be generated using the value and
415 * @param string $value (optional) Displayed label. Uses $act if not provided.
421 function form_makeButton($type, $act, $value='', $attrs=array()) {
422 if ($value == '') $value = $act;
424 'value'=>$value);
426 $attrs['title'] = $value .' ['. strtoupper($attrs['accesskey']) .']';
439 * @param string $value (optional) Default value.
450 function form_makeField($type, $name, $value='', $label=null, $id='', $class='', $attrs=array()) {
453 'type'=>$type, 'id'=>$id, 'name'=>$name, 'value'=>$value);
468 * @param string $value
476 function form_makeFieldRight($type, $name, $value='', $label=null, $id='', $class='', $attrs=array()) {
479 'type'=>$type, 'id'=>$id, 'name'=>$name, 'value'=>$value);
492 * @param string $value
500 function form_makeTextField($name, $value='', $label=null, $id='', $class='', $attrs=array()) {
503 'id'=>$id, 'name'=>$name, 'value'=>$value, 'class'=>'edit');
511 * Password elements have no default value, for obvious reasons.
558 * If $value is an array, a hidden field with the same name and the value
559 * $value[1] is constructed as well.
565 * @param string $value
573 function form_makeCheckboxField($name, $value='1', $label=null, $id='', $class='', $attrs=array()) {
575 if (is_null($value) || $value=='') $value='0';
577 'id'=>$id, 'name'=>$name, 'value'=>$value);
590 * @param string $value
598 function form_makeRadioField($name, $value='1', $label=null, $id='', $class='', $attrs=array()) {
600 if (is_null($value) || $value=='') $value='0';
602 'id'=>$id, 'name'=>$name, 'value'=>$value);
610 * The list of values can be strings, arrays of (value,text),
612 * An item is selected by supplying its value or integer index.
619 * @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
621 * @param string|int $selected default selected value, string or index number
658 * The list of values can be strings, arrays of (value,text),
660 * Items are selected by supplying its value or an array of values.
665 * @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
667 * @param array|string $selected value or array of values of the items that need to be selected
790 * Uses only 'name' and 'value' attributes.
799 return '<input type="hidden" name="'.$attrs['name'].'" value="'. formText($attrs['value']) .'" />';
838 $value = $attrs['value'];
839 unset($attrs['value']);
840 return '<button '.$p. buildAttributes($attrs,true) .'>'.$value.'</button>';
979 * If value is an array, a hidden field with the same name and the value
980 * $attrs['value'][1] is constructed as well.
994 if (is_array($attrs['value'])) {
996 .' value="'. hsc($attrs['value'][1]) .'" />';
997 $attrs['value'] = $attrs['value'][0];
1036 * _options : Array of (value,text,selected) for the menu.
1037 * Text can be omitted. Text and value are passed to formText()
1060 @list($value,$text,$select) = $attrs['_options'][$n];
1063 $p .= ' value="'. formText($value) .'"';
1065 $text = $value;
1085 * _options : Array of (value,text,selected) for the list.
1086 * Text can be omitted. Text and value are passed to formText()
1104 @list($value, $text, $select, $disabled) = $opt;
1106 if (is_null($text)) $text = $value;
1107 $p .= ' value="'. formText($value) .'"';