Skip to main content
deleted 3 characters in body
Source Link
dbj44
  • 4.8k
  • 10
  • 44
  • 80

After running a dpm($form) via hook_form_FORM_ID_alter I couldn't see the 'Local settings' in the form defintion of the user profile form. I did a search for 'locale settings' on all the code and found the value I need to alter (I think) on line 2016 of system.module. So I tried:

function MY_MODULE_form_system_user_timezone_alterMY_MODULE_form_user_profile_form_alter(&$form, &$form_state, $form_id) {
  $form['timezone']['#collapsible'] == FALSE;
}

Cleared the cache. Fieldset is still collapsible?

After running a dpm($form) via hook_form_FORM_ID_alter I couldn't see the 'Local settings' in the form defintion of the user profile form. I did a search for 'locale settings' on all the code and found the value I need to alter (I think) on line 2016 of system.module. So I tried:

function MY_MODULE_form_system_user_timezone_alter(&$form, &$form_state, $form_id) {
  $form['timezone']['#collapsible'] == FALSE;
}

Cleared the cache. Fieldset is still collapsible?

After running a dpm($form) via hook_form_FORM_ID_alter I couldn't see the 'Local settings' in the form defintion of the user profile form. I did a search for 'locale settings' on all the code and found the value I need to alter (I think) on line 2016 of system.module. So I tried:

function MY_MODULE_form_user_profile_form_alter(&$form, &$form_state, $form_id) {
  $form['timezone']['#collapsible'] == FALSE;
}

Cleared the cache. Fieldset is still collapsible?

Source Link
dbj44
  • 4.8k
  • 10
  • 44
  • 80

How do I set 'Locale settings' fieldset, in the user profile form, to uncollapsible?

After running a dpm($form) via hook_form_FORM_ID_alter I couldn't see the 'Local settings' in the form defintion of the user profile form. I did a search for 'locale settings' on all the code and found the value I need to alter (I think) on line 2016 of system.module. So I tried:

function MY_MODULE_form_system_user_timezone_alter(&$form, &$form_state, $form_id) {
  $form['timezone']['#collapsible'] == FALSE;
}

Cleared the cache. Fieldset is still collapsible?