Last active
April 20, 2018 14:02
-
-
Save davidjguru/ff49c3a15e6ec354efa0cf1983b5c797 to your computer and use it in GitHub Desktop.
Initial Version: Alterforms for Drupal 8, module file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
*Implements hook_form_alter() | |
*/ | |
function alterforms_form_alter(&$form, $form_state, $form_id) { | |
// Initial zone | |
switch ($form_id){ | |
case "your_string_form_id": | |
// Actions zone | |
// Debugging zone | |
kint($form); | |
break; | |
case "another_form_id": | |
drupal_set_message("We can work on another form"); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment