public function __construct($name, $caption, $value = NULL) { $id = 'form_field_' . self::$count++; $this->create_label($id, $caption); $this->input = html_standalone::create('input'); $this->input->id = $id; $this->input->value = $value; $this->input->name = $name; }
public function __construct($name, $caption, $value = null) { $id = 'form_field_' . self::$count++; $this->create_label($id, $caption); $input = $this->input[] = html_standalone::create('input'); $input->value = $value; $input->type = 'hidden'; $input->name = $name; $input = $this->input[] = html_standalone::create('input'); $input->id = $id; $input->type = 'text'; $input->class = 'datepicker'; $input->value = $value ? date('d.m.Y', $value) : ''; }
public function __construct($name, $caption, $options, $value = NULL) { $this->label = html_tag::create('div')->append($caption); $this->label->class = 'form_label'; $this->input = array(); foreach ($options as $k => $v) { $id = 'form_field_' . self::$count++; $label = html_tag::create('label')->append($v); $label->for = $id; $input = html_standalone::create('input'); $input->type = 'radio'; $input->id = $id; $input->value = $k; $input->name = $name; if ($k == $value) { $input->checked = true; } $this->input[] = array($input, $label); } }
public function linkbutton($value, $link, $class = 'btn') { $button = html_standalone::create('input')->attr('type', 'button')->attr('value', $value)->attr('class', $class); $this->buttons->append($button->attr('onclick', "location.href = '{$link}'")); return $button; }