function views_gantt_form_alter in Views Gantt 7.2
Implements hook_form_alter().
File
- ./
views_gantt.module, line 421 - Module file for Views Gantt
Code
function views_gantt_form_alter(&$form, &$form_state, $form_id) {
if (isset($_GET['render']) && $_GET['render'] == 'gantt-dialog') {
// Prepopulate parent and project fields in add task form.
if (!empty($_SESSION['views_gantt']['project_field'])) {
views_gantt_prepopulate_field($_SESSION['views_gantt']['project_field'], $_GET['project'], $form, $form_state);
}
if (!empty($_SESSION['views_gantt']['parent_field']) && $_GET['parent'] != $_GET['project']) {
views_gantt_prepopulate_field($_SESSION['views_gantt']['parent_field'], $_GET['parent'], $form, $form_state);
}
}
}