Yii Framework Forum: CForm vs. CRUD - Yii Framework Forum

Jump to content

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

CForm vs. CRUD Modify CRUD form or build CForm? Rate Topic: -----

#1 User is offline   Jaz Manister 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 109
  • Joined: 27-October 09
  • Location:Rural Western New York, USA

Posted 12 January 2010 - 01:03 PM

When exactly would you use CForm over the CRUD output? I have always just taken the CRUD code as a starting point and modified it to fit my needs. I'm a little confused what the difference is. I haven't gotten into CForm yet. Should I? Also, would it be crazy to ask that the CRUD command simple builds CForm based scripts?
0

#2 User is offline   notzippy 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 201
  • Joined: 06-October 08

Posted 12 January 2010 - 04:12 PM

Hi

CActiveRecords can be used for 1:1 input operations. Like storing a persons name and email.
But lets say based on one entry form you need to update several different CActiveRecords. Then I would use a CForm to validate that input and transfer it to the individual active records using the setAttributes..

nz
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