= $form->field($model, 'id_user')->dropDownList( ArrayHelper::map(User::find()->joinWith('userProducer')->where('user_producer.id_producer = '.Producer::getId())->andWhere('user_producer.active = 1')->orderBy('lastname ASC, name ASC')->all(), 'id', function($model, $defaultValue) {
return $model['lastname'].' '.$model['name'];
}), ['prompt' => '--','class' => 'form-control user-id', ]) ?>
Produits
errors['products']) && count($model->errors['products']))
{
echo '
'.$model->errors['products'][0].'
' ;
}
?>
= $form->field($model, 'comment')->textarea(['rows' => 6]) ?>
= Html::submitButton('Enregistrer' , ['class' => 'btn btn-primary']) ?>