.
'/path/to/contacts/ajax_update/'.$contact['Contact']['id'].'/name', // Path to the update method.
array("okButton" => "false", // Disable the submit button and use submitOnBlur
"cancelLink" => "false", // Disable the cancelLink (Looks neater)
"submitOnBlur" => "true")); // Enable Submit on Blur
editor('state_id', // The id of the State
'/admin/contacts/ajax_update/'.$contact['Contact']['id'].'/state_id', //Path to the update method
array("okButton" => "true", // This time we need the OK button.
"cancelLink" => "false", // Disable the cancelLink (Looks neater)
"submitOnBlur" => "false", // Does not work with collection editor, so we disable it here
"collection" => $stateListAjax)); //Here we pass the array of states to display in the select box.
?>