CActiveForm ajax edit mode

Hi,

I have a CActiveForm that appears through a pop up box.

When creating new records this works fine however …

When editing records I have no way of telling the form which "id" is used to populate the form, infact I have no way of populating the form either.

Is there any conventional method to do this in Yii?

Generally this would work when using Yii as the page refreshes and we set the idea in the controller on the model, but because the form is appearing in a pop up box and the page is not being refreshed it has no way of settings this id.

Is there a way to set to an active forms id and load the form details using jquery / yii?

I am looking for something like …





$("active_form_id").id = 12;

$("active_form_id").loadForm();




You can do it as

On each link/item, you can set a function like as




<a href="itemid" onClick="callme(itemid);"></a>



Then use this itemid in your ajax function to get the required data for editing

Ok thanks.