Last active
August 10, 2018 22:37
-
-
Save edutrul/5e4be84bdfd39fd27493059b3cbf3879 to your computer and use it in GitHub Desktop.
How to access node form fields in a hook_form_alter
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 | |
| $fieldPlus = 'field_layout_region2_icon'; | |
| $form[$fieldPlus]['widget']['#title'] = 'widget title'; | |
| $form[$fieldPlus]['widget'][0]['#title'] = 'widget 0 title'; | |
| $form[$fieldPlus]['widget'][0]['value']['#title'] = 'widget 0 value title'; | |
| // If something is printed first! then that should be the way to go. | |
| dpm($form[$fieldPlus]['widget']); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment