YiiBooster icon indicating copy to clipboard operation
YiiBooster copied to clipboard

Default placeholder goes into options in dropDownListRow (Bug)

Open patternseeker89 opened this issue 10 years ago • 0 comments

When I use this in view: $form->dropDownListRow($model, 'user_id', User::model()->getArrUsers());

The default placeholder appears in the select's options list.

In the method of the component TbActiveForm setDefaultPlaceholder() the check for !empty($fieldData[1][3]) returns false. Because there is an empty array of $htmlOptions.

There should be this condition:

if(isset($fieldData[1][3]) && is_array($fieldData[1][3])) {

patternseeker89 avatar Oct 23 '14 08:10 patternseeker89