How to Remove N/A Option in Radio Button Field Drupal 7

One of the interesting Features of Drupal 7 is the Field API. Prior to Drupal 6, to make a custom field the Core Profile Module and Content Profile Modules are used. Now in Drupal 7 we can make any custom field to appear in User Registration Form.

When Adding Custom Fields Such as Gender usually we use Radio Button Input. However there is a small Problem with the core module as it displays the third option N/A in the input. To Remove the N/A option the field needs to be set as mandatory.

To Remove this option there is another way. Go to modules/field/modules/options/options.module and comment the
the code $properties[’empty_option’] = ‘option_none’ as shown below under buttons.

Note: Proper way to achieve it would be to override this function in custom module. But for a Quick Fix we can also follow this method, as we are just commenting a single line.