Created
January 5, 2017 14:09
-
-
Save init90/d75f014c1fdcc29262e61a059a40f038 to your computer and use it in GitHub Desktop.
drupal 7, preprocess password confirm.
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
| function MYMODULE_form_user_register_form_alter(&$form, &$form_state, $form_id) { | |
| $form['account']['pass']['#process'] = array( | |
| 'form_process_password_confirm', | |
| 'MYMODULE_password_confirm_process', | |
| 'user_form_process_password_confirm' | |
| ); | |
| } | |
| function MYMODULE_password_confirm_process($element) { | |
| $element['pass1']['#attributes']['title'] = 'Title'; | |
| $element['pass2']['#attributes']['title'] = 'Title2'; | |
| return $element; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment