I recently setup a Gravity Forms form that generates a zip download on submission. Whenever someone hits ‘submit’, a ZIP is generated based on user values. This works by hooking into
gform_confirmation and returning a
header('content-disposition: attachment; filename=file.zip');.
The entry is created, the zip download starts but.. the form becomes unusable afterwards. You cannot generate a zip file a second time since the submit button is disabled.
Well, there’s an easy fix for that. The snippet below overrides the submit event listener and makes sure that it’s always submitted.
Leave a Reply