function farm_plan_consideration_delete_form_submit in farmOS 7
Delete form submit handler.
Parameters
array $form: The form array.
array $form_state: The form state array.
File
- modules/
farm/ farm_plan/ farm_plan_consideration/ farm_plan_consideration.module, line 571 - Farm plan consideration module.
Code
function farm_plan_consideration_delete_form_submit(array $form, array &$form_state) {
// Pull the plan and consideration out of the form.
$plan = $form_state['values']['plan'];
$consideration = $form_state['values']['consideration'];
// Delete the consideration.
farm_plan_consideration_delete($consideration->id);
// Set a message.
drupal_set_message(t('The consideration was deleted.'));
// Redirect to the considerations list.
$form_state['redirect'] = 'farm/plan/' . $plan->id . '/considerations';
}