beginForm() public static method
Generates a form start tag.
See also endForm().
public static string beginForm ( $action = '', $method = 'post', $options = [] ) | ||
---|---|---|
$action | array|string |
The form action URL. This parameter will be processed by yii\helpers\Url::to(). |
$method | string |
The form submission method, such as "post", "get", "put", "delete" (case-insensitive). Since most browsers only support "post" and "get", if other methods are given, they will be simulated using "post", and a hidden input will be added which contains the actual method type. See yii\web\Request::$methodParam for more details. |
$options | array |
The tag options in terms of name-value pairs. These will be rendered as the attributes of the resulting tag. The values will be HTML-encoded using encode(). If a value is null, the corresponding attribute will not be rendered. See renderTagAttributes() for details on how attributes are being rendered. Special options:
|
return | string |
The generated form start tag. |
Please login to continue.