Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements hook_element_info_alter().
- */
- function module_element_info_alter(array &$types) {
- // Add placeholders to password_confirm element.
- $types['password_confirm']['#process'][] = "_module_add_pass_confirm_placeholders";
- }
- function _module_add_pass_confirm_placeholders(&$element, FormStateInterface $form_state, &$complete_form) {
- $element['pass1']['#placeholder'] = t('Password');
- $element['pass2']['#placeholder'] = t('Confirm password');
- return $element;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement