You are here

function hosting_subdirs_form_alter in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 subdirs/hosting_subdirs.module \hosting_subdirs_form_alter()
  2. 7.3 subdirs/hosting_subdirs.module \hosting_subdirs_form_alter()

Implements hook_form_alter().

File

subdirs/hosting_subdirs.module, line 11
Allow sites to be installed in subdirectories.

Code

function hosting_subdirs_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'site_node_form') {

    // Since our form changes should persist across failed validations, we need
    // to use '#after_build' here.
    // @see https://www.drupal.org/project/drupal/issues/671574#comment-3061880
    $form['#after_build'][] = 'hosting_subdirs_alter_alias_documentation';
    $form['#after_build'][] = 'hosting_subdirs_alter_alias_validation';
  }
}