Description
JavaScript filter allowing the file upload markup to be filtered as it is being uploaded.
Usage
<script> gform.addFilter( 'gform_file_upload_status_markup', function( statusMarkup, file, size, strings, removeFileJs, up ) { // Customize statusMarkup as desired. return statusMarkup; } ); </script>
Parameters
- statusMarkup string
Markup template used to render the status of the file being uploaded.
-
file {plupload.File}
Instance of File being uploaded. See: https://www.plupload.com/docs/v2/File.
-
File size.
-
strings object
Array of localized strings relating to the file upload UI.
-
removeFileJs string
JS used to remove the file when the “Cancel” link is click/pressed.
-
Instance of Uploader responsible for uploading current file. See: https://www.plupload.com/docs/v2/Uploader.
Examples
<script> gform.addFilter( 'gform_file_upload_status_markup', function() { return '<div id="{0}" class="ginput_preview">{1} <span style="color:#f00;">{2}</span> <b></b> <a href="javascript:void(0)" title="{3}" onclick="{4}" onkeypress="{4}">{5}</a></div>'; } ); </script>
Since
This filter was added in Gravity Forms version 2.4.8.3.
Source Code
This filter is located in gravityforms/js/gravityforms.js.