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:

  1. configuration
  2. account settings
  3. 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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -