How to set the id form with CHtml::beginForm()

Hi, i’m new with this framework and i can’t figure if it’s possible and how, if it’s possible, set the id in a form with beginForm.

I’m using a JQuery dialog to add new elements on a related model (so in one form i can do all the possible operations for this model). My problem lies that when the new related element is inserted (the one using the jquery dialog) it closes the dialog and, in this case, updates with ajax the dropdown list of related elements, but the form retains the data inserted in the previous operation so i want to do a $(’#id_form’).reset() to clear the form.

You can explain to me how to do this (or another aproax to optain the reset of the form)?

Thanks for your time and sorry for my poor explanation and english.




<?php

CHtml::beginForm('','post',array('id'=>'formId'));

?>



Thank you Spyros ;)