This is for entity form submission.
Entityform has field collection field which contains computed field and other text field.

Inside computed field I need hostEntityId(in this case id of Entityform), but hostEntityID() is returning false. Code I tested

/*get wrapper to which current field is attached*/
$wrapper = entity_metadata_wrapper($entity_type, $entity);

//get the host entity to which field collection is attached.
$entityid = $entity->hostEntityId();
dpm($entityid);// returning empty

$host = $entity->hostEntity( );
dpm($host); // work ok but entityid is missing

$bundle= $entity->hostEntityBundle();
dpm($bundle);//works ok , returning custom entityform type that I created.


$entity_field[0]['value'] = "some more computation..";

Comments

NancyDru’s picture

Issue summary: View changes

Having a similar problem with CER.