Yii Framework Forum: linkButton out of CHtml::form to submit the form - Yii Framework Forum

Jump to content

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

linkButton out of CHtml::form to submit the form Rate Topic: -----

#1 User is offline   ilzale 

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

Posted 25 October 2008 - 11:57 AM

from what i have experienced in yii a link created via CHtml helper automatically submits the CHtml::form where it resides. I am in the situation of creating a CHtml::linkButton out of the form that i want to submit.

I have solved creating a tag <a> with some javascript that submit the CHtml::form, but in my opinion it is not an elegant solution.

Is there another way to do so?
0

#2 User is offline   qiang 

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

Posted 25 October 2008 - 01:45 PM

Linkbutton is able to work outside a form. Did u try that?
0

#3 User is offline   ilzale 

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

Posted 25 October 2008 - 02:10 PM

do you have a code example for a linkbutton out of a CHtml::form (but in the same view) that submit that form?
0

#4 User is offline   qiang 

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

Posted 25 October 2008 - 04:38 PM

The delete buttons created using yiic crud are example.
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