I'm using the hook admin_items_batch_edit_form to enable batch editing of a plugin variable. The edit form is displayed correct in the admin interface and I can post the new value for my selected items, but I can't catch that new value in either after_save_item or before_save_item. The only thing I have to "play" with is the 'record' data. Below is the code that doesn't work
public function hookAfterSaveItem($args) {
if (is_admin_theme()){
if($args['post']['edit_status_id']){
$item = $args['record'];
//...
//Update my plugin with the value of edit_status_id
//...
}
}
}
But I can't catch the 'edit_status_id' from 'post' above. The whole 'post' is null in both after_save_item and before_save_item. When doing a print_r($args) the only thing that contains data is the 'record' fields.
Is there a bug or is there any other way of catching the values from the fields added with admin_items_batch_edit_form.
This is the main content of my function that corresponds to the hook:
$html = '<div id="custom-edit-status-form" class="field">';
$html .= $args['view']->formLabel('custom[edit_status_id]', 'Status',array('class'=>'two columns alpha'));
$html .= '<div class="inputs five columns omega">';
$html .= $args['view']->formSelect('custom[edit_status_id]', '', NULL, $values);
$html .= '</div></div>';
Has any one else got it working with batch editing in /admin/items/batch-edit?