function farm_plan_form_submit in farmOS 7
Plan submit handler.
Parameters
array $form: The form array.
array $form_state: The form state array.
1 string reference to 'farm_plan_form_submit'
- farm_plan_form in modules/
farm/ farm_plan/ farm_plan.pages.inc - Plan form.
File
- modules/
farm/ farm_plan/ farm_plan.pages.inc, line 188 - Farm plan pages.
Code
function farm_plan_form_submit(array $form, array &$form_state) {
$farm_plan = $form_state['values']['farm_plan'];
entity_form_submit_build_entity('farm_plan', $farm_plan, $form, $form_state);
farm_plan_save($farm_plan);
$farm_plan_uri = entity_uri('farm_plan', $farm_plan);
$form_state['redirect'] = $farm_plan_uri['path'];
drupal_set_message(t('Plan saved: <a href="@uri">%title</a>', array(
'@uri' => url($farm_plan_uri['path']),
'%title' => entity_label('farm_plan', $farm_plan),
)));
}