Yii Framework Forum: How to add dynamically attributes to a model ? - Yii Framework Forum

Jump to content

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

How to add dynamically attributes to a model ? Rate Topic: -----

#1 User is offline   jptsetung 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 04-March 10

Posted 07 March 2010 - 04:13 PM

I want to create forms with a dynamic number of fields. Each field would be called "field0" "field1" ... 'fieldN".

How can I create the same dynamic attrivutes in the corresponding model ? (or maybe there is a more clever way to do this...)
0

#2 User is offline   Roberto 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 15-October 09

Posted 08 March 2010 - 04:24 AM

View Postjptsetung, on 07 March 2010 - 04:13 PM, said:

I want to create forms with a dynamic number of fields. Each field would be called "field0" "field1" ... 'fieldN".

How can I create the same dynamic attrivutes in the corresponding model ? (or maybe there is a more clever way to do this...)


May be you should take a look at this extension: http://www.yiiframew...ion/eavbehavior
0

Share this topic:


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

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