In hook_field_widget_form you should return the entire element again in the array under your value key. This way developers can acces the #entity_type, #bundle and #field_name properties when needed.
At Clientside Validation we need this to be able to validate the phone fields (we need to get the country code from the field settings, and thus we need the field's name to retrieve these settings).

All Drupal core modules follow this guideline, for example:
Number and Text Fields

Attached is a patch that fixes this.

Comments

attiks’s picture

Status: Needs review » Reviewed & tested by the community

this works

cweagans’s picture

Category: task » bug
Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x-1.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.