Skip to content

Javascript Actions/Filters

The image_hopper_filepond_config filter lets you manipulate the FilePond instance configuration. FilePond is the JavaScript library that powers Image Hopper’s upload functionality, so customizing its configuration gives you fine-grained control over the user experience.

Filter Signature

image_hopper_filepond_config(config, FilePond, $form, currentPage, formId, fieldId, entryId, files, fileInput)

Parameters

  • config (object) — The FilePond configuration object. Accepts all properties listed in the FilePond instance documentation.
  • FilePond (object) — The FilePond public API object.
  • $form (object) — A jQuery object matching the encompassing Gravity Forms <form> element.
  • currentPage (integer) — The current page number of the Gravity Forms form.
  • formId (integer) — The Gravity Forms form ID.
  • fieldId (integer) — The Image Hopper field ID.
  • entryId (integer) — The Gravity Forms entry ID (if one exists).
  • files (array) — A list of files already uploaded at initialization.
  • fileInput (object) — The <input type="file"> object being enhanced by Image Hopper.

Examples

Usage

You can create a separate JavaScript file and enqueue it when your form is displayed, or add an HTML field to your form and wrap the filter in <script type="text/javascript"></script> tags. The HTML field approach is simpler:

Gravity Forms HTML field containing a JavaScript snippet that registers the image_hopper_filepond_config filter.
Easily add the filter to your website via an HTML field

Additional Info

You can customize any property documented in the FilePond API reference, but we recommend avoiding these properties to prevent breaking core functionality or relying on unsupported features:

  • name
  • status
  • element
  • server
  • captureMethod
  • allowReorder