You are here

function varbase_form_install_configure_form_alter in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x

Same name and namespace in other branches
  1. 8.8 varbase.profile \varbase_form_install_configure_form_alter()
  2. 8.4 varbase.profile \varbase_form_install_configure_form_alter()
  3. 8.5 varbase.profile \varbase_form_install_configure_form_alter()
  4. 8.6 varbase.profile \varbase_form_install_configure_form_alter()
  5. 8.7 varbase.profile \varbase_form_install_configure_form_alter()
  6. 7.3 varbase.profile \varbase_form_install_configure_form_alter()
  7. 7 varbase.profile \varbase_form_install_configure_form_alter()
  8. 7.2 varbase.profile \varbase_form_install_configure_form_alter()

Implements hook_form_FORM_ID_alter() for install_configure_form().

Allows the profile to alter the site configuration form.

File

./varbase.profile, line 24
Enables modules and site configuration for a Varbase site installation.

Code

function varbase_form_install_configure_form_alter(&$form, FormStateInterface $form_state) {

  // Add a placeholder as example that one can choose an arbitrary site name.
  $form['site_information']['site_name']['#attributes']['placeholder'] = t('My Official Site Name');

  // Default site email noreply(at)vardot.com.
  $form['site_information']['site_mail']['#default_value'] = 'noreply@vardot.com';
  $form['site_information']['site_mail']['#attributes']['style'] = 'width: 25em;';

  // Default user 1 username should be 'webmaster'.
  $form['admin_account']['account']['name']['#default_value'] = 'webmaster';
  $form['admin_account']['account']['name']['#attributes']['disabled'] = TRUE;
  $form['admin_account']['account']['mail']['#default_value'] = 'webmaster@vardot.com';
  $form['admin_account']['account']['mail']['#description'] = t('In most case, and for <a target="_blank" href="@link">Vardot</a> specific use, we recommend this to always be <em>webmaster@vardot.com</em>.', [
    '@link' => 'http://vardot.com',
  ]);
}