Prepopulate a custom user field on registration? I have created a custom field on the user entity. I would like to prepopulate this field with the value 0. So, when the user goes to their account page after registration the field is already filled in, which they are then free to change. Just like the username and email. The only way I can think to do this is to alter the registration form. I added this to my module, but when I created a new user, a new row did not appear in the field table. My module function:

function MYMODULE_form_user_register_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['account']['field_MYFIELD'][LANGUAGE_NONE][0] = array(
    '#type' =&gt; 'value',
    '#value' =&gt; 0,
  );
}


Where am I going wrong, or is there a better approach. Thanks.
Value field is only used for hidden purpose, it will not populate to user. Check below link

https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#val