Home Forums General Issues Extra tags when placing a Gravity Form in a WYSIWYG


Extra tags when placing a Gravity Form in a WYSIWYG

  • Hello.
    Wondering if anyone else has run into this issue. I have a Custom WYSIWYG field and when I place a Gravity Forms shortcode inside the form is rendered with extra P and BR tags between inputs. However, no problem when I place the shortcode in the normal content field. I was thinking that possibly there is a filter in Gravity Forms that is stripping these tags from the_content (that I could apply to the acf_the_content), but they say no.

    Anyone else had this problem? Seems to be odd behavior.
    I have implemented some css to hide those tags, however I would rather find a better solution.

    Thanks for any help.

  • What happens if you get the unformatted value from the ACF WYSIWYG and then apply the_content filters to it?


    $value = get_field('wysiwyg');
    $value = apply_filters('the_content', $value);
    echo $value;
  • Same problem here. It doesn’t work if I try getitng the unformatted value and applying the filters as John suggested above.

    The gravity forms shortcode works fine in the main editor, but not in my ACF wysiwyg editor.

  • John, do you have any other ideas on this issue? I used to use Formidable forms, but my client has switched to Gravity for all their sites now, and this issue is wreaking havoc on layouts since so many of the forms are in ACF WYSWIG editor fields.

    Thank you for any insight!

  • No, no ideas here. Shortcodes should work the same in either an ACF WYSIWYG field or in the standard WP editor WYSIWYG. The function that is called to output the content for a shortcode is determined by the function.

  • Just checking back in on this to say that this still happens with other form plugin shortcodes as well (Mailpoet, Formidable), and only when used in an ACF wysiwyg field. It seems the issue is that BR tags are added below each hidden field in the form, thus creating a bunch of empty lines above and below the form. Again, this does not happen in the native WP editor — only ACF. This happens with any theme I try. Has anyone had any success with fixing this problem?

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Extra tags when placing a Gravity Form in a WYSIWYG’ is closed to new replies.