Add non mandatory fields to user registration form I can add custom fields to the user registration form, if I add the fields to the user profile: admin/config/people/accounts/fields

There is a checkbox "Show on user registraion" which is inactive:


The checkbox only gets active if I check "Mandatory field", but some of the fields must not be mandatory. Is that a bug? Is there a workaround (without using module 'Profil2') ?

I'm using Drupal Core 7.28
I have never encountered such problem before. But since you have such problem then I think the best way is to write a hook_form_alter. And set the required field that you don't want as mandatory to false.

function mymodule_form_alter(&amp;$form, $form_state, $form_id){
switch ($form_id)  {
    case 'registration_form_id': 
                $form['field_name']['und'][0]['value']['#required'] = FALSE;
            break;
                   }
               }


Hope this helps.