Reload Form in a Custom Element

Instructions

  1. Install this snippet with our free Custom JavaScript plugin. https://gravitywiz.com/gravity-forms-code-chest/

Code

Filename: gprf-reload-form-in-custom-element.js

/**
 * Gravity Perks // GP Reload Form // Reload Form in a Custom Element
 * https://gravitywiz.com/documentation/gravity-forms-reload-form/
 *
 * Instructions:
 *
 * 1. Install this snippet with our free Custom JavaScript plugin.
 *    https://gravitywiz.com/gravity-forms-code-chest/
 */
gform.addFilter( 'gprf_replacing_elem', function( $replacingElem, self.formId, self ) {
	return $( '#my-custom-element' );
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.