Example #1
0
 public function label_button($cfg, $force = false)
 {
     $this->record('label_button', $cfg);
     $cont = new element('div');
     $ele = $this->button($cfg, 1);
     // Submit by default!
     if ($this->_root_element && !is_string($ele->attr('type'))) {
         $ele->attr('type', 'submit');
     }
     $cont->add_class(self::$field_class)->append($ele);
     $label = $this->label(' ');
     $this->append($label)->append($cont);
     return $this->_chainable && !$force ? $this : [$label, $cont];
 }