Files Addon for Event Espresso 4

Description

Files add on plugin allows to create file type question which can be used in event registration form. Attendees will be able to upload files while registerting for an event using this addon. Admin will be able to restrict the file type by setting file extensions for each question.

Screenshots

  • Create file type question.
  • Display of registration form.
  • Uploaded file preview in dashboard.

Installation

Minimum Requirements

  • WordPress 4.1 or greater
  • PHP version 5.2.4 or greater
  • MySQL version 5.0 or greater
  • Event espresso version: 4.8.0 or greater
  • This add on will not work in Internet explorer version 9 or below, because formData (javascript object used to upload file on server) is not supported in IE 9 or its below version.

Manual installation

Following steps should be followed to install plugin manually

  1. Upload ‘files-addon-for-event-espresso-4’ folder to the ‘/wp-content/plugins/’ directory or upload ‘files-addon-for-event-espresso-4.1.0.8.zip’ through WordPress admin panel
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. You are ready to create file type question.

FAQ

Why my plugin is not getting activated?

This is add on plugin of Event espresso 4. Therefore to activate this plugin Event espresso 4.x must be active and running.

Why files are not getting uploaded?

Check your current browser version. We have used formData object to upload files. Visit following link to check the compatibility of your browser: https://developer.mozilla.org/en/docs/Web/API/FormData

Where can I get support or talk to other users?

If you get stuck, you can email on aparnascodex[at]gmail[dot]com

What file formats are supported for upload?

Default allowed file formats are: jpeg, jpg, png, gif, bmp.
Different file formats can be set for individual file question.

Reviews

November 29, 2016 1 reply
I’m one of the Event Espresso core developers who primarily worked on the forms system. I’ve scanned over the code and it looks very similar to our ideal for what an addon would look like. Thanks! Is there a Github repo for this? That would be nice for collaboration IMO. FYI we’ve recently added a better way for enqueuing scripts and CSS with form inputs. You should basically put the contents of EE_SSA_FILE::ssa_enqueue_scripts() inside a new method EE_File_Display_Strategy::enqueue_js() (which overrides the parent’s enqueue_js() method). That way you’ll only enqueue js and css when the input will actually be displayed. Right now, you’ll be enqueueing the JS and CSS as soon as the input is created, regardless of whether it’s actually displayed during this request or not. This change may make it work not work with older versions of EE4, before the enqueue_js method on fields was called consistently. For that you might want to follow the model of our mock addon a little more closely, ie actually use EE_Register_Addon::register() to register your addon, register a module (eg name it something like EED_SSA_File_Input which sets up all the actions and filters your addon needs), and also set a minimum EE core version. This way, if someone tries to run your add-on with an older version of EE, they’ll get a notice saying it’s too old and then the actions/filters won’t be executed. But for the most part, this seems to work great.
September 3, 2016 1 reply
Great work! Thanks for sharing this. Would be nice to have a link to download/open the image when viewing the registrants details (screenshot: http://www.screencast.com/t/ohSjb5T9). Maybe make the image clickable? By the way, I added this to our “Third-party Add-ons” page on our website: https://eventespresso.com/third-party-addons/
Read all 3 reviews

Contributors & Developers

“Files Addon for Event Espresso 4” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

Tested up to WordPress 6.5.2 and Event Espresso 5.0.8p

1.2.1 – May 19, 2023

  1. Compatiblity changes with Event Espresso 5.x
  2. Fixed fatal error

1.2 – May 05, 2021

  1. Fixed file naming issue
  2. Tested plugin with latest WordPress and Event Espresso version

1.0.9

  1. Added functionality to edit file from dashboard

1.0.8

  1. Added filter to rename file before uploading – Filter – ssa_override_filename
  2. Tested plugin with latest WordPress and Event Espresso version

1.0.7

  1. Fixed admin notice
  2. Fixed ‘invalid url on file upload’ error

1.0.6

  1. Fixed domain validation issue

1.0.5

  1. Fixed (required) validation issue of files.

1.0.4

  1. Added feature to set different file extensions for each file type question
  2. If extensions are not set then uploaded file is validated against following extensions [‘gif’,’png’ ,’jpg’,’jpeg’,’bmp’]

1.0.3

  1. Added filter ‘ssa_change_file_upload_path’ to change directory path of uploaded file
  2. Added standard code to return file type question.

1.0.2

  1. Fixed error message display.
  2. Added link to image.

1.0.1

Fixed file upload security issue. Added EE_FILE_Validation_Strategy class for validating uploaded file.

1.0.0

Plugin release