I've got a field which keeps track of a custom status for users. The default status is 'Pending', and all new users should receive this status. The value can not be unset, and it thus makes sense to set it to be required. However, when selecting 'require', Drupal dictates that it should appear on the user registration form.
Would it be an idea to allow fields with a default value to not appear on the user registration form. Then, if the field is not set, it would simply be given its default value as the initial value.
Comments
Comment #1
webchickI don't think it's safe for core to make that assumption, no. Default value = Default value; no other magic is implied. I would recommend solving this with a custom module. A quick hook_form_alter() would enable you to set the specific field to hidden.
Comment #2
sbrattla commentedI've had a quick look into the Field Permission module.
It seems that if I set the field to only be accessible by a certain role, then anonymous users are not allowed to edit the field upon registration. I believe that solved the issue.
Thanks for your quick reply by the way.
Comment #3
webchickOh, nice. That works too. :)