Yii Framework Forum: Collecting Tabular Input - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Collecting Tabular Input Rate Topic: -----

#1 User is offline   Armando 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 80
  • Joined: 11-November 08
  • Location:Brazil - Rio de Janeiro

Posted 11 December 2008 - 10:49 AM

I need to collect data in the form using "Collecting to Tabulate Input." in the form, I have several "activeRadioButtonList."

Exemple:

CHtml::activeRadioButtonList($tipo_evento, "aluno_ve[$i]", array('1'=>'sim', '0'=>'não'));

...

I receive this message:

CException
Description

Property "tipo_evento.aluno_ve[0]" is not defined.
Source File

D:\WebServer\Apache2210\htdocs\yii-1.0.0.r322\framework\db\ar\CActiveRecord.php(393)
...




Thanks!


0

#2 User is online   qiang 

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

Posted 11 December 2008 - 12:39 PM

Could you please create a ticket about this issue? Thanks!
0

#3 User is offline   Armando 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 80
  • Joined: 11-November 08
  • Location:Brazil - Rio de Janeiro

Posted 11 December 2008 - 12:41 PM

I solved the problem!!!

I had to force the attribute 'name' in the array of the $htmlOptions.

See the exemple:


foreach($tipoeventoList as $i=>$tipo) {
  echo CHtml::activeRadioButtonList($tipo, "aluno_ve", array('1'=>'sim', '0'=>'não'), array('name'=>get_class($tipo)."[$i][aluno_ve]", 'separator'=>' / '));
}




The way below it's doesn't work:


foreach($tipoeventoList as $i=>$tipo) {
  echo CHtml::activeRadioButtonList($tipo, "aluno_ve[$i]", array('1'=>'sim', '0'=>'não'), array('separator'=>' / '));
}



CHtml::activeRadioButtonList($tipo, "aluno_ve[$i]", ...) could be a bug?

Sorry my english :))




0

#4 User is online   qiang 

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

Posted 11 December 2008 - 12:53 PM

Yes, it is a bug.
0

#5 User is offline   Armando 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 80
  • Joined: 11-November 08
  • Location:Brazil - Rio de Janeiro

Posted 11 December 2008 - 01:03 PM

I created a ticket
http://code.google.c...detail?id=53#c0

Armando from Rio de Janeiro - Brazil  ;D
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

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