Hi, I have a tough question
-I have a CActiveFrom with tabular inputs, configured with 'enableAjaxValidation' => true
-My goal is to dynamically add inputs when pressing on a 'Add button'. This is easy with Chtml::ajax() and a partial
-My issue is that the form does not know that inputs have been added, because the new, ajax-appended inputs were not there when the form widget was created.
How do I re-init $('#the-form').yiiactiveform() so it gets to validate the full list of attributes, the old ones and the ajax-appended ones?
I tried to call $('#the-form').yiiactiveform() from the FireBug console with a different set of parameters, it breaks the validation by disabling it.
Please take note again that my aim is full ajax, both on validation and on appending new form fields.
Thanks
-I have a CActiveFrom with tabular inputs, configured with 'enableAjaxValidation' => true
-My goal is to dynamically add inputs when pressing on a 'Add button'. This is easy with Chtml::ajax() and a partial
-My issue is that the form does not know that inputs have been added, because the new, ajax-appended inputs were not there when the form widget was created.
How do I re-init $('#the-form').yiiactiveform() so it gets to validate the full list of attributes, the old ones and the ajax-appended ones?
I tried to call $('#the-form').yiiactiveform() from the FireBug console with a different set of parameters, it breaks the validation by disabling it.
Please take note again that my aim is full ajax, both on validation and on appending new form fields.
Thanks