Event Organiser FES 1.3

Templates

All form elements now have corresponding templates (though some, such as the input and number fields, share the same template). This templates live in event-organiser-fes/templates/elements/ and include template parts for form labels, descriptions and error message. You can over-ride a template by copying it the root of your theme.

Added elements

There have been two new elements added:

  • Tickets – you can now allow users to create and edit events with tickets
  • Tags – you can now add a field for users to assign tags to an event

Excluding categories/tags from the form

You can now exclude specific categories or tags from the event category / tag elements. There are two ways of doing this:

  1. Copying the appropriate template (eo-event-form-event-category/eo-event-form-event-tag) to your theme and provide the an array of term IDs to exclude.

  2. Or, preferably, use the following snippet to either exclude terms from a particular element, or all event category/tag elements (this latter method means you do not need to update your code to reflect any possible changes in the ID of the element).

    add_action( 'eventorganiser_get_fes_form', function( $form ) {
        //Either specify the event category element by ID - change 5 to the appropriate ID
        $form->get_element(5)->set( 'exclude', array( 1, 2, 3 ) ); //excludes term IDs 1, 2 and 3
    
        //OR you can get all elements of the appropriate type:
        $all_elements = $form->flatten_elements();
        foreach( $all_elements as $element ) {
             if ( 'event_category' == $element->type ) {
                  $element->set( 'exclude', array( 1, 2, 3 ) ); //excludes term IDs 1, 2 and 3
             }
        }
    }, 1 );
    

Event edit notifications

If you have front-end editing enabled, you can enable admin notifications for when a user edits an event. The setting is enabled on a form-by-form basis, and is located on the notifications tab of the form customiser.

Accessibility improvements

The mark-up of the front-end submission form has been changed to signficantly improve the accessibility. This includes associating labels to a field or group of fields, appropriately managing the focus when (for example) a thumbnail image is removed, and adding screen-reader text.

Other changes

Event schedule label – A setting for configuring the ‘event schedule’ label has been added. This is available when editing the element in the form customiser (click the element to reveal the element settings). Clickable guest name – When a guest (logged-out) users submits an event, in the event admin screen their name is now clickable, and opens your e-mail client. Submitter details – Details of the user who submitted the event are now included in the submission notification e-mail.

Bug fixes

  • The category element now correctly applies the custom class assigned to it.
  • A bug where the last name part of the name field ignored the required setting
  • Fixes a typo in the HTML class applied to (the container of) elements with an error
  • Fixes a typo in the error code of the invalid number error (for the number field)
  • Fixes the strict warning reported here.
  • Fixes bug where user is not returned in edit mode when editing an event an error with their submission is encountered.
  • Fixes eo-fes-form-notice-submission-complete class being applied to every notice
  • Fixes a bug where its impossible to remove all the category terms when editing an event