You are here

function farm_plan_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.pages.inc, line 280
Farm plan pages.

Code

function farm_plan_delete_form_submit(array $form, array &$form_state) {
  $farm_plan = $form_state['values']['farm_plan'];
  farm_plan_delete($farm_plan);
  drupal_set_message(t('%title was deleted.', array(
    '%title' => entity_label('farm_plan', $farm_plan),
  )));
  $form_state['redirect'] = '<front>';
}