seems doable using https://www.drupal.org/project/inline_entity_form.
Steps I followed was:
- Enable
Location Block
, Address
& Event
Entities in CiviCRM Entity Settings page.
- Ensure module weight for CiviCRM Entity is lower than
Inline entity form
.
drush ev 'module_set_weight("civicrm_entity", -10);'
Rebuild cache (drush cr
) 2-3 times before proceeding for the next step.
Structure => CiviCRM Entity => CiviCRM Location block => Manage Form Display
Enable Address ID field and ensure Widget is set to Inline entity form
.
Similarly, enable Location Block ID field and set the widget to Inline entity form
in Structure => CiviCRM Entity => CiviCRM Event => Manage Form Display
Visit the form at /civicrm-event/add
to create events
Note: APIv3 requires contact_id and location_type_id field while creating address in civicrm. The former is not required while creating address for events so can be considered as an api bug.
Ensure these 2 fields are present on the Address entity to avoid any fatal error on the form submission.