Custom widget not saving
After studying the code in modules/field/text/text.module, I found the missing item: I had to assign my new widget to $element['value'], so:

$element['value'] = $widget;
return ($element);