function drupal_commons_features_form_submit in Drupal Commons 6.2
Submit handler for the feature choice form
1 call to drupal_commons_features_form_submit()
- _drupal_commons_drush_tasks in includes/
drush.inc - Automated run through the option forms since drush can't handle the forms
File
- includes/
form.inc, line 189 - Contains form-related functions for the installation profile
Code
function drupal_commons_features_form_submit(&$form, &$form_state) {
// Build an array of chosen features
$features = array();
// Extract the selected features from the form
foreach ($form_state['values'] as $key => $value) {
if (substr($key, 0, 8) == 'feature-') {
if ($value == 1) {
$features[] = substr($key, 8);
}
}
}
// Store a temporary variable to access later
variable_set('commons_selected_features', $features);
// Initiate the next installation step
variable_set('install_task', 'configure-theme');
// Redirect back to the installation page
if (isset($form_state['values']['url'])) {
drupal_goto($form_state['values']['url']);
}
}