Include HTML Fields in {all_fields} Merge Tag By Default

Code

Filename: gw-include-html-fields-in-all-fields-merge-tag.php

<?php
/**
 * Gravity Wiz // Gravity Forms // Include HTML Fields in {all_fields} Merge Tag By Default
 * https://gravitywiz.com/
 */
add_action( 'gform_merge_tag_filter', function( $value, $tag, $modifiers, $field ) {
	if ( $field->type == 'html' && $tag == 'all_fields' ) {
		$value = $field->content;
	}
	return $value;
}, 10, 4 );

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.