How do I use the form hook alt to edit fields of inline entity form? I am trying to use the hook_form_alter to modify the fields of an Inline entity form in a commerce product display node.

I know how to edit a normal field but this does not work for an entity form field. How do I go about editing a field, for example changing the price field label?

Thanks
Robert
As per IEF's API docs, you've got:


hook_inline_entity_form_entity_form_alter()



  Perform alterations before an entity form is included in the IEF widget.
  hook_inline_entity_form_reference_form_alter()



  Perform alterations before the reference form is included in the IEF widget.
  
  The reference form is used to add existing entities through an autocomplete field

hook_inline_entity_form_table_fields_alter()


  Alter the fields used to represent an entity in the IEF table.
  
  The fields can be either Field API fields or properties defined through hook_entity_property_info().



I think the first would be most appropriate here, probably something like (guessing at the array keys here, they might be different):

function MYMODULE_inline_entity_form_entity_form_alter(&amp;$entity_form, &amp;$form_state) {
  if ($entity_form['#entity_type'] == 'commerce_product') {
    $entity_form['commerce_price']['#title'] = t('New title.');
  }
}