Usage example:
php
use kartik\form\ActiveForm;
use kartik\builder\FormGrid;
$form = ActiveForm::begin($options); // $options is array for your form config
echo FormGrid::widget([
'model' => $model, // your model
'form' => $form,
'autoGenerateColumns' => true,
'rows' => [
[
'attributes' => [
'username' => ['type' => Form::INPUT_TEXT, 'options'=> ['placeholder'=>'Enter username...']],
'password' => ['type' => Form::INPUT_PASSWORD],
]
],
[
'attributes' => [
'first_name' => ['type' => Form::INPUT_TEXT],
'last_name' => ['type' => Form::INPUT_PASSWORD],
]
]
]
]);
ActiveForm::end();