Yii Framework Forum: dropDownList attribute 'name' not set? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

dropDownList attribute 'name' not set? Rate Topic: -----

#1 User is offline   me23 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 45
  • Joined: 20-October 08
  • Location:Germany

Posted 15 November 2008 - 04:55 AM

Hello,

if i generate a dropdownlist with

 <?php echo CHtml::dropDownList('ProjectId',0, $this->getProjects()); ?>


i got this in return
<select id="ProjectId">
<option value="-1"></option>
...
</select>


But like this, on submit the selected value will not be transmitted.
This does not occur by activeDropDownList.

I could fix it by adding following Line in CHtml after Line 433:
$htmlOptions['name']= $name;


then i got:
<select id="ProjectId" name="ProjectId">

and submiting works fine.

Greetings from Germany
me23
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,899
  • Joined: 04-October 08
  • Location:DC, USA

Posted 15 November 2008 - 07:12 AM

Yeah, this was fixed in http://code.google.c...ce/detail?r=194
Thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users