I want to create a Gravity Forms form that will allow various logged in user roles to submit an event from the front end of the website. Can someone suggest the hooks or filters that may come in handy for accomplishing. I plan to use the GF gform_after_submission Action Hook. I did see this post below and wanted to also check that there is nothing available for EE4?
Event Espresso doesn’t actually expose hooks on the front end that are related to adding events. Any hooks you’d use in this case would be exposed by Gravity Forms.
You can make use of Event Espresso’s model system which simplifies writing data to tables used by Event Espresso for storing event related data.
Thanks, the model system is exactly what I needed. After some playing around with the system, I was able to add a new event with EE_Event::new_instance. I am having some issue with deducing all the model references and field names. For instance, I need to set the dates and times for the event and trying to do different ways like this after getting my new event id:
I see the $datetime object in the error log after the save and see [DTT_EVT_start] => 2019-04-01 08:00:00\n and [DTT_EVT_end] => 2019-04-01 08:00:00\n, however the actual dates saved are the current date and time ran. Perhaps a format is not correct or I’m missing other required fields?
I’m also needing to add the image from a url and venue information.
The support post ‘Front end submission with Gravity Forms’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.