Alter entity reference autocomplete field I have made a module to alter the way entity reference works with autcomplete fields. I have override the entity_reference_autcomplete function where i have changed the following line:

        $key = "$label ($entity_id)";


with

        $key = "$label";


It seems to work when completing fields in form , but after the form has been submitted the autcomomplete field gets blank and the result is not saved . How can i solve this issue ?
This should be done by writing a custom CTools EntityReference selection plugin.  Your new class would just extend EntityReference_SelectionHandler_Generic_node and I think it would only need to override the getLabel() method to make things "just work".