2amigos / yiiwheels

Widget extension library for the YiiStrap extension
http://yiiwheels.2amigos.us
Other
133 stars 77 forks source link

Field color when validation raises error #40

Closed re1naldo closed 11 years ago

re1naldo commented 11 years ago

I tried to put WhDatePicker & WhRedactor in a form, but when form validation raises errors, those components don't turn red like normal text field (textFieldControlGroup). Is there a way to set them like yiistrap's control groups? I tried something like:

echo $form->labelEx($model, 'date_start'); $this->widget('yiiwheels.widgets.datepicker.WhDatePicker', array( 'model'=>$model, 'attribute'=>'date_start', 'pluginOptions'=>array( 'format'=>'mm/dd/yyyy',
), )); echo $form->error($model, 'date_start');

but the label and widget didn't turn red when validation raised an error.

tonydspaniard commented 11 years ago

Hi @re1naldo

Unfortunately there is no way to do that without coding that feature yourself.

I really do not want to start coding an extension of TbActiveForm as I used to do with YiiBooster, because we will end up having the same issues with the code base.

re1naldo commented 11 years ago

Antonio,

Thanks for your kind response. I understand the issue.