Drupal 7 - User profile field editable only at registration -
in drupal 7, there way display mandatory field @ registration, , make un-editable after user has registered?
thanks in advance!
from drupal backend:
- configuration
- account settings
- manage fields
from here can add new field (be sure check box asks if field should present on user registration form)
then you'll want use hook disable field in user_profile
form.\
code: template.php
function theme_form_alter(&$form, &$form_state, $form_id) { switch($form_id) { case 'user_profile_form': $form['field_my_field']['#disabled'] = true; break; } }
Comments
Post a Comment