activeForm--How to hide the "Label" ?


<?= $form->field($model, 'username') ?>

This will create all the <label> and <input> ,but I just need "input"…

Hi, you can change template property of Form.


<?php $form = ActiveForm::begin([

		'fieldConfig' => [

			'template' => "{label}\n{input}\n{hint}\n{error}",

		],

    ]); ?>



Or




<?= $form->field($model, 'username')->label(false) ?>



:) OK,thanks