0

So I have this function:

/**
 * Implements hook_form_FORM_ID_alter().
 */
function my_module_form_user_profile_form_alter(&$form, &$form_state, $form_id) {
  dsm($form);
}

What I want to do is to remove "Language settings" fieldset with all the radio buttons inside it. But for some reason I don't have any array element which is responsible for displaying this data. I've read that this should be $form['locale'] but it's not there for sure. What migght cause this kind of behaviour?

2

It could be that your form_alter happens before the locale field is added. Make sure your module runs last.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.