TbHtml::statefulFormTb PHP Method

statefulFormTb() public static method

Generates a stateful form tag.
public static statefulFormTb ( $layout = self::FORM_LAYOUT_VERTICAL, mixed $action = '', string $method = 'post', array $htmlOptions = [] ) : string
$action mixed the form action URL.
$method string form method (e.g. post, get).
$htmlOptions array additional HTML attributes.
return string the generated form tag.
    public static function statefulFormTb($layout = self::FORM_LAYOUT_VERTICAL, $action = '', $method = 'post', $htmlOptions = array())
    {
        return self::formTb($layout, $action, $method, $htmlOptions) . self::tag('div', array('style' => 'display: none'), parent::pageStateField(''));
    }

Usage Example

Example #1
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     $this->attachBehavior('TbWidget', new TbWidget());
     $this->copyId();
     if ($this->stateful) {
         echo TbHtml::statefulFormTb($this->layout, $this->action, $this->method, $this->htmlOptions);
     } else {
         echo TbHtml::beginFormTb($this->layout, $this->action, $this->method, $this->htmlOptions);
     }
 }
All Usage Examples Of TbHtml::statefulFormTb
TbHtml