You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using this ActiveForm/ActiveField widget you need to be aware of the bootstrap form layout style you are using (which is not included in the default yii activeform and activefield widgets).
What you are experiencing is because you are using HORIZONTAL FORM layout which requires special styling. The template can be set for other layouts (VERTICAL/INLINE). Its recommended you use the formConfig and fieldConfig properties in conjunction with other new properties for label, error etc. for defining your custom layouts.
The template was being overridden for horizontal forms - to preserve the special bootstrap styles and offsets.
However, I have now pushed a small enhancement now for you to define your own template, but beware it might break the horizontal form layout styling - you need to watch the HTML markup for bootstrap horizontal forms.
Hi, i'm using FileInput widget on a form and i change
use yii\widgets\ActiveForm;
to
use kartik\widgets\ActiveForm;
I have two forms in this view, the second is:
$form_general = ActiveForm::begin([
'id' => 'profile-form',
'options' => ['class' => 'form-horizontal'],
'fieldConfig' => [
'template' => "{label}\n<div class="col-lg-7">{input}\n<div class="col-lg-7">{error}",
'labelOptions' => ['class' => 'col-lg-4 control-label'],
],
'enableAjaxValidation' => true,
]);
but using Kartik ActiveForm the 'template' setting doesn't works. If i rollback and use standard Yii ActiveForm, it's all ok (also Kartik FileInput).
Is there another way to set up 'template' options in Kartik ActiveForm?
Thank's
The text was updated successfully, but these errors were encountered: