submit CActiveForm from a link

Hi, sorry for my english… i’ am new at Yii, and i’m having little problems with basic stuff like how to trigger the submit method of a CActiveForm, by clickin’ a link menu, i know it is basic but i need some orientation, as i don’t find much information and examples in the documentation

$this->menu2=array(

array('label'=>'Some label', 'url'=>'#', 'linkOptions'=>array('onclick'=>'alert("hello")')),

);

the CActiveFormis called ‘form1’

how to do this?, someone please… thanks a lot

try this

‘linkOptions’=>array(‘submit’=>array(‘delete’,‘id’=>$model->email_id)

Welcome both to the forum!

If you want to submit static data, follow the advice of storemalt.

If you want to submit a form in the page, use:


'linkOptions'=>array('onClick'=>'$("#IdOfTheForm").submit()'),