You are here

function afb_existing_blocks_display_form_submit in Advanced Form Block 7

Submit handler for the existing block list form facilitating its deletion.

1 string reference to 'afb_existing_blocks_display_form_submit'
afb_existing_blocks_display_form in ./afb.module
Displays the form listing existing created blocks in a tableselect fomat.

File

./afb.module, line 194
Allows administrators to create blockd of node add/edit forms.

Code

function afb_existing_blocks_display_form_submit($form, $form_state) {
  foreach ($form_state['values']['table'] as $key => $val) {
    if ($val != 0) {
      afb_block_delete($val);
      db_delete('afb_blocks_data')
        ->condition('delta', $val)
        ->execute();
    }
  }
}