Answers.Body: <p>I admire the principle of not being too ambitious in building customizations, but I worry that you'd be going through far more trouble than you'd need to.  You might consider just building a custom Drupal module that did exactly what you need.</p>
  
  <p>Set up a Drupal form with <a href="https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7" rel="nofollow">all the fields that you need</a>.  Then in the submit function, use the CiviCRM API to create the event, location, and whatever else--including leaving the event inactive.  It won't be very reuseable, but it will be more reliable and understandable than a Rube Goldberg Does Drupal sort of contraption.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-29T12:32:11.810Z
Answers.Text: I hear you, especially as latest civicrm_entity is alpha but is it really that simple/maintainable? Need to create new event from template, present editable fields with related existing or new entities like location and price sets.  Do basic validation and save new entities.
Answers.UserDisplayName: Sonicthoughts
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-29T13:27:16.350Z
Answers.Text: Locations should be fairly straightforward to implement this way.  Price sets, not so much.  However, are you really expecting people outside the organization to create events where you're collecting money?
  
  If you do need to use price sets, you might set up one or more standard price sets and have those be available as a selection on your form.  That way people aren't creating sets, fields, and options (and getting confused what's an price option vs. a price field).
Answers.UserDisplayName: Andie Hunt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-01T15:07:38.790Z
Answers.Text: 1) the idea is to have members/contributors create 80% of the event content and preview, then let a content manager finalize/approve.  This is common in the CMS world. 2) as for price sets, unfortunately simple pricing rarely works.  agree that could just be a form field and part of the 20% for content editor.  Definitely wouldn't expose the whole enchilada!  I will look into your approach.
Answers.UserDisplayName: Sonicthoughts
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-01T15:14:54.683Z
Answers.Text: Also, one thing this doesn't address is the use of a civicrm template.  The idea is that a template could have default/stub content setup and managed natively in civicrm.  The user is presented with a form, the stub content and then can edit those fields which would require a Content Editor to finalize/approve (in their Civicrm dashboard)
Answers.UserDisplayName: Sonicthoughts
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-29T02:29:14.603Z
Answers.LastActivityDate: 2015-05-29T02:29:14.603Z
Answers.UserDisplayName: Andie Hunt
Answers.Body: <p>There is a new submodule to the CiviCRM Entity Project, CiviCRM Entity Reference Field</p>
  
  <p>This module was originally developed for your exact desire, to be able to edit Event location block addresses from the Drupal Event edit form. It became apparent that this module would be useful for many similar purposes, such as editing a contacts civicrm addresses from the Contact entity Drupal edit form.</p>
  
  <p>This module defines a field type of the same name that can be added to CiviCRM Entity types. </p>
  
  <p>It stores no data in the Drupal field tables, but accesses the CiviCRM directly for add/edit/delete...so you can call it a "remote reference field"</p>
  
  <p>It makes use of the Inline Entity Form module for manipulating the data.</p>
  
  <p>So for your event, you add a CiviCRM Entity Reference field, labeled Location</p>
  
  <p>In the field settings, match the screenshot below:
  <a href="https://i.sstatic.net/ak61N.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ak61N.png" alt="enter image description here"></a></p>
  
  <p>So what you are doing is reference the LocBlock entity from the Event entity, all data in CiviCRM</p>
  
  <p>Then on the LocBlock form, add a field Addresses and configure like so:
  <a href="https://i.sstatic.net/e9n89.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/e9n89.png" alt="enter image description here"></a></p>
  
  <p>Using the Inline Entity Form - Single widget for each field. 
  What you get when you edit an event is:
  <a href="https://i.sstatic.net/YRsLv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/YRsLv.png" alt="enter image description here"></a></p>
  
  <p>In addition, there are two other new field types provided by submodules of the CiviCRM Entity project</p>
  
  <p><strong>CiviCRM Entity Price Set Field</strong>
  Provides a field type to edit the price set of an Event. At this time it only enables editing of the options of the first price field in the set, but is good for simple events.</p>
  
  <p>On Event display, it provides a Drupal multi-page ajax powered form for event registrations.</p>
  
  <p><a href="https://i.sstatic.net/DUDBN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DUDBN.png" alt="enter image description here"></a></p>
  
  <p><strong>CiviCRM Entity Profile</strong></p>
  
  <p>Allows select which profiles are used for the event registration page, and on the Price set Field Display event registrations</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-19T02:08:59.830Z
Answers.LastActivityDate: 2017-01-19T02:08:59.830Z
Answers.UserDisplayName: jackrabbithanna
Body: <p><strong>Problem:</strong> Currently, we need a trained content editor to create events. The event content, often comes via email from others inside (or outside) the organization.  This typically involves copy/paste of event info.  I could setup a form but this would still require manual effort.</p>
  
  <p><strong>Objective:</strong> I'm looking for a clever workflow adjustment to allow people (authenticated or even anonymous) to stage the event content for approval so that many people can initiate the event workflow and an event coordinator can finalize/approve.  Civi already has the public/active flags for events. I know many folks are developers and jump to a dev solution, but wondered if some creative folks had an approach to this for a system builder without much new coding - Anyone up to the challenge?</p>
  
  <p><strong>Scope:</strong> Clearly this can be done via development of an extension/api or custom tpl, but wondered if someone has a lower cost/maintenance approach to preparing/staging content in CiviCRM (like drafts/workflow in a CMS.) I'm using Drupal.</p>
  
  <p><strong>Approaches:</strong> Since I'm using Drupal, one path I considered is civicrm_entity which now 
  supports domain.com/civicrm-event/add or domain.com/civicrm-event/edit.  This exposes the laundry list of event fields so I would need display suite or some other module to hide most of the irrelevant fields and set the event to inactive.  The problem here is that price / location / etc. are actually different entities so I believe i'd need code to join them.  The nice thing here is that the user can see the template content and then just edit it or leave it.</p>
  
  <p>Another thought was creating to webform or entityform to ask the user to fill-in things like event title, description, etc. and then using drupal rules, create an event based on a template and copy those fields to a new, unpublished event.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-28T15:29:50.200Z
Comments.Text: BTW - not sure if this is an appropriate use of stack-exchange or if we should tag these kinds of broad approach questions somehow ....
Comments.UserDisplayName: Sonicthoughts
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-28T20:50:02.030Z
Comments.Text: IMO it's on topic here.
Comments.UserDisplayName: Coleman
Tags: <drupal><best-practice><civicrm-entity><drupal-rules>
Title: Workflow approach for anonymous users, or limited roles to create events
ThreadText: # Workflow approach for anonymous users, or limited roles to create events
  
  (Asked by: username_0 on 2015-05-28)
  
  **Problem:** Currently, we need a trained content editor to create events. The event content, often comes via email from others inside (or outside) the organization. This typically involves copy/paste of event info. I could setup a form but this would still require manual effort.
  
  **Objective:** I'm looking for a clever workflow adjustment to allow people (authenticated or even anonymous) to stage the event content for approval so that many people can initiate the event workflow and an event coordinator can finalize/approve. Civi already has the public/active flags for events. I know many folks are developers and jump to a dev solution, but wondered if some creative folks had an approach to this for a system builder without much new coding - Anyone up to the challenge?
  
  **Scope:** Clearly this can be done via development of an extension/api or custom tpl, but wondered if someone has a lower cost/maintenance approach to preparing/staging content in CiviCRM (like drafts/workflow in a CMS.) I'm using Drupal.
  
  **Approaches:** Since I'm using Drupal, one path I considered is civicrm\_entity which now
  supports domain.com/civicrm-event/add or domain.com/civicrm-event/edit. This exposes the laundry list of event fields so I would need display suite or some other module to hide most of the irrelevant fields and set the event to inactive. The problem here is that price / location / etc. are actually different entities so I believe i'd need code to join them. The nice thing here is that the user can see the template content and then just edit it or leave it.
  
  Another thought was creating to webform or entityform to ask the user to fill-in things like event title, description, etc. and then using drupal rules, create an event based on a template and copy those fields to a new, unpublished event.
  
  **Tags:** drupal, best-practice, civicrm-entity, drupal-rules
  
  > **Comments:**
  > **username_0**: BTW - not sure if this is an appropriate use of stack-exchange or if we should tag these kinds of broad approach questions somehow ....  
  > **username_1**: IMO it's on topic here.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-05-29. Score: 4
  
  I admire the principle of not being too ambitious in building customizations, but I worry that you'd be going through far more trouble than you'd need to. You might consider just building a custom Drupal module that did exactly what you need.
  
  Set up a Drupal form with [all the fields that you need](https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7). Then in the submit function, use the CiviCRM API to create the event, location, and whatever else--including leaving the event inactive. It won't be very reuseable, but it will be more reliable and understandable than a Rube Goldberg Does Drupal sort of contraption.
  
  > **Comments:**
  > **username_0**: I hear you, especially as latest civicrm_entity is alpha but is it really that simple/maintainable? Need to create new event from template, present editable fields with related existing or new entities like location and price sets.  Do basic validation and save new entities.  
  > **username_2**: Locations should be fairly straightforward to implement this way.  Price sets, not so much.  However, are you really expecting people outside the organization to create events where you're collecting money?  If you do need to use price sets, you might set up one or more standard price sets and have those be available as a selection on your form.  That way people aren't creating sets, fields, and options (and getting confused what's an price option vs. a price field).  
  > **username_0**: 1) the idea is to have members/contributors create 80% of the event content and preview, then let a content manager finalize/approve.  This is common in the CMS world. 2) as for price sets, unfortunately simple pricing rarely works.  agree that could just be a form field and part of the 20% for content editor.  Definitely wouldn't expose the whole enchilada!  I will look into your approach.  
  > **username_0**: Also, one thing this doesn't address is the use of a civicrm template.  The idea is that a template could have default/stub content setup and managed natively in civicrm.  The user is presented with a form, the stub content and then can edit those fields which would require a Content Editor to finalize/approve (in their Civicrm dashboard)  
  
  ---
  
  ### Answer by username_3 on 2017-01-19. Score: 0
  
  There is a new submodule to the CiviCRM Entity Project, CiviCRM Entity Reference Field
  
  This module was originally developed for your exact desire, to be able to edit Event location block addresses from the Drupal Event edit form. It became apparent that this module would be useful for many similar purposes, such as editing a contacts civicrm addresses from the Contact entity Drupal edit form.
  
  This module defines a field type of the same name that can be added to CiviCRM Entity types.
  
  It stores no data in the Drupal field tables, but accesses the CiviCRM directly for add/edit/delete...so you can call it a "remote reference field"
  
  It makes use of the Inline Entity Form module for manipulating the data.
  
  So for your event, you add a CiviCRM Entity Reference field, labeled Location
  
  In the field settings, match the screenshot below:
  [![enter image description here](https://i.sstatic.net/ak61N.png)](https://i.sstatic.net/ak61N.png)
  
  So what you are doing is reference the LocBlock entity from the Event entity, all data in CiviCRM
  
  Then on the LocBlock form, add a field Addresses and configure like so:
  [![enter image description here](https://i.sstatic.net/e9n89.png)](https://i.sstatic.net/e9n89.png)
  
  Using the Inline Entity Form - Single widget for each field.
  What you get when you edit an event is:
  [![enter image description here](https://i.sstatic.net/YRsLv.png)](https://i.sstatic.net/YRsLv.png)
  
  In addition, there are two other new field types provided by submodules of the CiviCRM Entity project
  
  **CiviCRM Entity Price Set Field**
  Provides a field type to edit the price set of an Event. At this time it only enables editing of the options of the first price field in the set, but is good for simple events.
  
  On Event display, it provides a Drupal multi-page ajax powered form for event registrations.
  
  [![enter image description here](https://i.sstatic.net/DUDBN.png)](https://i.sstatic.net/DUDBN.png)
  
  **CiviCRM Entity Profile**
  
  Allows select which profiles are used for the event registration page, and on the Price set Field Display event registrations
  
  
  ---
  
  