public static function input($name = null, $value = '', $right = 'class="fullWidth"') { if (is_array($name) && isset($name[0])) { $html = self::label($name[0], $name[1]); return $html . parent::input($name[0], $value, $right) . '<hr/>'; } return parent::input($name, $value, $right); }
/** * Generates hidden form fields. * You can pass a simple key/value string or an associative array with multiple values. * * @param string|array input name (string) or key/value pairs (array) * @param string input value, if using an input name * @return string */ public static function hidden($data, $value = NULL) { if (!is_array($data)) { $data = array($data => $value); } $result = parent::open_fieldset(array('class' => 'hidden_inputs'), ''); foreach ($data as $name => $value) { // This is a special case, we will get the classes back as well as // having to do this in a the parent loop, therefore we never // call the hidden parent but rather do the same function here... list($name, $value, $classes) = self::_addDefaults(__FUNCTION__, $name, $value); $attr = array('type' => 'hidden', 'name' => $name, 'id' => html::token($name . ' hidden'), 'value' => $value, 'class' => $classes); $result .= parent::input($attr) . "\n"; } $result .= self::close_fieldset(); return $result; }
public static function input($data, $value = '', $extra = '', $double_encode = TRUE) { $value = self::get_value($data, $value); return parent::input($data, $value, $extra, $double_encode); }