TbHtml::formTb PHP Method

formTb() public static method

Generates a form tag.
public static formTb ( string $layout = self::FORM_LAYOUT_VERTICAL, string $action = '', string $method = 'post', array $htmlOptions = [] ) : string
$layout string the form layout.
$action string the form action URL.
$method string form method (e.g. post, get).
$htmlOptions array additional HTML attributes.
return string the generated tag.
    public static function formTb($layout = self::FORM_LAYOUT_VERTICAL, $action = '', $method = 'post', $htmlOptions = array())
    {
        return self::beginFormTb($layout, $action, $method, $htmlOptions);
    }

Usage Example

Exemplo n.º 1
0
 public function testForm()
 {
     $I = $this->codeGuy;
     $html = TbHtml::formTb(TbHtml::FORM_LAYOUT_VERTICAL, '#', 'post', array('class' => 'form'));
     $form = $I->createNode($html, 'form.form-vertical');
     $I->seeNodeCssClass($form, 'form');
     $I->seeNodeAttributes($form, array('action' => '#', 'method' => 'post'));
 }
All Usage Examples Of TbHtml::formTb
TbHtml