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 empty or null. 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['value'] = "some more computation..";