Yii Framework Forum: Multiple Instances Of The Same Model - Yii Framework Forum

Jump to content

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

Multiple Instances Of The Same Model Rate Topic: -----

#1 User is offline   ChiragChetan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 20-September 12
  • Location:Mumbai, India

Posted 21 September 2013 - 03:20 AM

I am trying to add number of records and so I need to create multiple instances of same model and number of records is not known.On clicking add button a new row is generated and i need to fill the details and submit the complete form and save in the database.
So how to create that model instance...??
Any help is appreciated.

Thanx in advance.!!!!
0

#2 User is offline   Ankit Modi 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 866
  • Joined: 19-February 13
  • Location:India

Posted 21 September 2013 - 04:07 AM

View PostChiragChetan, on 21 September 2013 - 03:20 AM, said:

I am trying to add number of records and so I need to create multiple instances of same model and number of records is not known.On clicking add button a new row is generated and i need to fill the details and submit the complete form and save in the database.
So how to create that model instance...??
Any help is appreciated.

Thanx in advance.!!!!



please see forum

i hope it's some help.
Thanks,
Ankit Modi
Skype : amodi06
0

#3 User is offline   ChiragChetan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 20-September 12
  • Location:Mumbai, India

Posted 21 September 2013 - 05:30 AM

View PostMaggie Q(Ankit Modi), on 21 September 2013 - 04:07 AM, said:

please see forum

i hope it's some help.


In the link its about the validation of two models,I am looking on how to create an array of instances of the same model but size of array is not fixed. For validation i myself have created a form model.But how to create its array that is the main problem. :-[
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