function farm_movement_asset_move_action_form in farmOS 7
Configuration form for farm_movement_asset_move action.
Parameters
array $context: The context passed into the action form function.
array $form_state: The form state passed into the action form function.
Return value
array Returns a form array.
File
- modules/
farm/ farm_movement/ farm_movement.location.inc, line 803 - Code for managing the location of assets with movement logs.
Code
function farm_movement_asset_move_action_form(array $context, array $form_state) {
// Date field.
$form['date'] = array(
'#type' => 'date_select',
'#title' => t('Date'),
'#date_format' => 'M j Y',
'#date_type' => DATE_FORMAT_UNIX,
'#date_year_range' => '-10:+3',
'#default_value' => date('Y-m-d H:i', REQUEST_TIME),
'#required' => TRUE,
);
// Area reference field.
$form['areas'] = array(
'#type' => 'textfield',
'#title' => t('Location'),
'#autocomplete_path' => 'taxonomy/autocomplete/field_farm_area',
'#required' => TRUE,
);
// Done field.
$form['done'] = array(
'#type' => 'checkbox',
'#title' => t('This movement has taken place (mark the log as done)'),
'#default_value' => TRUE,
);
// Return the form.
return $form;
}