Yii Framework Forum: Post conflict between CGridView and CActiveForm on same page - Yii Framework Forum

Jump to content

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

Post conflict between CGridView and CActiveForm on same page Rate Topic: -----

#1 User is offline   SystemicPlural 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 136
  • Joined: 12-April 10

Posted 02 February 2011 - 08:20 AM

I have a CGridView and a CActiveForm on the same page, both using the same model.

The problem is that filter for the gridview is using the same html names as the activeform and so the activeform ones do not get posted back.

How do I get around this?
0

#2 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 02 February 2011 - 08:34 AM

You should work as if you were collecting a tabular input, so using 2 index for differentiate them.

Take a looke here, instad of number you can use ['filter']['attributeName'] and ['form']['attributeName']
0

#3 User is offline   SystemicPlural 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 136
  • Joined: 12-April 10

Posted 02 February 2011 - 08:38 AM

Thanks Zac, That should do it.
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