0

I have been attempting to change various fields on the user profile to make it more user friendly, most of it going well. However, when I try to access $form for the main user profile via dpm($form) in MODULE_NAME_form_alter not every field rendered onto the page is available. I have been trying to alter the profile forever with no luck!

function admin_dashboard_form_alter(&$form, &$form_state, $form_id){
    if($form_id == 'user_profile_form'){
        //change main user profile "Ubercart Roles" form field
        $form['uc_roles']['#title'] = t('Member Expiration');
        $form['uc_roles']['#collapsible'] = FALSE;
        $form['uc_roles']['#collapsed'] = FALSE;
    }
}

1 Answer 1

0

I figured it out! My module name was alphabetically before the other modules..."A" (admin_dasboard) comes before "U" (ubercart_roles). I was able to go into the drupal_system table and set my modules weight to 1, where before it was set to 0, the same as Ubercart. Hope this helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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