A simple plugin that displays a form to allow people to enter events for the Events Made Easy plugin on a regular wordpress page.
A simple plugin that displays a form to allow people to enter events for the Events Made Easy plugin on a regular wordpress page (called “Frontend Submit”).
Get The Events Made Easy plugin:
https://wordpress.org/extend/plugins/events-made-easy/
The plugin will look for form template and style files in the following paths, in that priority:
The overloadable files at this moment are:
To allow for multiple forms to be used, you can add an option to the shortcode to indicate the name of the form template (default: form.php).
Example: [emefs_submit_event_form template=test.php]
If your template is not found in one of the 4 locations mentioned above, the default templates/form.php will be taken
As shown in the templates examples, you call EMEFS::field(‘xxx’) with ‘xxx’ being one of:
event_name
event_status
event_category_ids
event_start_date
event_start_time
event_end_date
event_end_time
event_notes
event_contactperson_email_body
event_respondent_email_body
event_url
event_rsvp
registration_requires_approval
registration_wp_users_only
event_image_url
event_seats
price
location_name
location_description
location_address1
location_address2
location_city
location_state
location_zip
location_country
location_latitude
location_longitude
For all possible fields, look at eme_events.php, function eme_new_event.
If you activated the option to use the captcha, you can (must) also use the field ‘captcha’
If you activated the option to use Google reCAPTCHA, you can (must) also use the field ‘recaptcha’
If you activated the option to use hCaptcha, you can (must) also use the field ‘hcaptcha’
Well, in fact it is easier than thought. Just by using
EMEFS::attribute(‘phone2’)
in the form template, the attribute phone2 is available and can be used in an event template via #_ATT{phone2}
By default, the formtype for attributes is textarea, if you want a plain text field, use e.g.:
EMEFS::attribute(‘phone2′,’text’)
Many newer event options are stored in properties, see eme_events.php function eme_init_event_props(), for a whole list.
A small enumeration:
auto_approve ()
ignore_pending ()
all_day ()
take_attendance ()
min_allowed
max_allowed
rsvp_end_target
rsvp_discount
rsvp_discountgroup
use_worldpay ()
use_stripe ()
use_braintree ()
use_stripe ()
You can use these like this: EMEFS::property(‘xxx’);
For the ones marked with (*), use the extra binary option: EMEFS::property(‘xxx’,’binary’);
If you have defined custom fields of type Events or Locations in EME, they are part of the event or location definition.
In that case, you can also ask in the frontend for that info, by using EMEFS::custom_field(‘xxx’). ‘xxx’ can be the id or the fieldname.
Example (under the assumption ‘my_price’ is a custom event or location field):
Example (under the assumption ’15’ is a custom event or location field):
Example (under the assumption ’15’ is a custom event or location field):
EMEFS::attribute, EMEFS::property and EMEFS::field can have a second argument, indicating the type of your field of choice:
Example:
Example:
The different types supported: textarea (default), text, hidden, tel, url, email and number
Also the event_url regular field entry can have the url-html5 option:
If you want to show a certain field as a drop/down select, use as second option (for type) the value ‘binary’
E.g. EMEFS::property(‘all_day’,’binary’)
If you want a certain field to be required (if not by default), use EMEFS::required_field(‘xxx’)
For required attributes, use EMEFS::required_attribute(‘xxx’)
For required properties, use EMEFS::required_property(‘xxx’)
If you want to use a default value for certain attributes or properties, you can use a third parameter for EMEFS::field, EMEFS::attribute and EMEFS::property.
E.g. EMEFS::property(‘event_single_event_format_tpl’,’hidden’,”value=2″);
This third parameter can also be used to add custom styles etc …:
E.g. EMEFS::property(‘event_single_event_format_tpl’,’hidden’,”value=2 class=’my_class'”);
Action emefs_submit_event_action: this allows a custom action after event submit (like emailing the info to people).
(see the action eme_insert_event_action in the main EME plugin as an example).
Filter emefs_categories_filter: to filter the categories, see also eme_categories_filter
Filter emefs_event_insert_filter: executed just before insert of the new event in the database (so you can change certain properties by default). See also eme_insert_event_filter
Filter emefs_success_url: takes the current success page as parameter and needs to return a new url. This allows you to change the success page per submitted event
Older changes can be found in changelog.txt