How to submit a CActiveForm without a button by AJAX ?!?!?

I’m trying to make a CActiveForm containing a single textField to submit without a submit button, but I need it to call the action via AJAX !!!


Maybe you want to execute ajax on jquery keypress, keydown or keyup, then grab the textfield value and save your model.

it would be much better to use CActiveForm !!! I want to make everything robust as possible !!!

thank u :)

Now I get what you want. I haven’t tested it myself, but you can try something like that:

if(isset($_POST['ajax']) && $_POST['ajax']==='your-form')






Hope it helps.