Question: I would like to show a default value if the user doesn't fill in a field in the user profile.

For example: 

I have a Hair type field. If the user fills it in, i would like the following output:

**Hair type: long.**

It is already working. If the user doesn't fill in the field, i would like the following output:

**Hair type: Not specified.**

I use Display Suite to display the user profile. I don't want to set a default value to the field, because i just want to show the Not specified value on the user profile page.

Which contrib modules or hooks can i use to solve this problem?

Answer: 
To add default value to User Profile field. Go to admin/config/people/account settings/manage fields and edit that particular field. When you on the edit form of that field, there is a field to set `Default Value`. You can add any default value that you want in that field.
Here is a method that does it with Display Suite.

Install modules: Entity, Display Suite UI, Display Suite Format

Go to Manage Display page for 'Account' where you already have Display Suite active. 

Create a Custom Field of type 'code field'. Select 'User' in Entities section, and in Field code box make sure Display Suite Code is the text format, and add this:

```
<?php 
$entity_user = entity_metadata_wrapper('user', $entity);
$set = FALSE;
if (!$entity_user->field_hair_type->value()) {
  $entity_user->field_hair_type->set('Not specified');
  $set= TRUE;       
}
print render(field_view_field(
  'user', $entity, 'field_hair_type')
);
// set it back to empty, just in case someone calls save on it which is highly unlikely
if ($set) $entity_user->field_hair_type->set(''); 
?>

```

Your field name will be different so just sort that out.

And lastly just drag your field into the layout area of display suite where you want it displayed. Leave the original field to not display.