Using CakePHP’s Ajax based observefield, I would like to update multiple fields, into my form, any idea how can i achieve this?
If i try with 'update' => array('NoncompetitorEventId','NoncompetitorEventId') it doesn’t work even. It works for single field update, but not for multiple ones.
Kindly let me know if some patch is there. I’m using CakePHP 1.2 version.
Thanks !
You can do it with little tweak using the
prototypealong withobserve field:Like:
Step 1: Call your function using observe field and call protype function on complete as follow:
Step 2: Set the required fields in json variable in your called function:
Step 3: Now you will get the above fields in your updateDetails function which is in
add.ctpAnd like this you can update more than one field using observe field.