Update default done value to match form state.

This commit is contained in:
paul121 2020-07-15 09:46:22 -07:00 committed by Michael Stenta
parent f4ecb23098
commit 48b292bfd4
1 changed files with 5 additions and 0 deletions

View File

@ -74,6 +74,11 @@ function farm_livestock_move_form($form, &$form_state) {
'geom' => NULL,
);
// Update default done value to match form state.
if(isset($form_state['values']['move']['done'])) {
$defaults['done'] = $form_state['values']['move']['done'];
}
// Load a planned movement log.
$movement_log = NULL;
if(!empty($form_state['values']['movement_log'])) {