• Hello,

    Here is my issue.
    When I alter shortcodes via the "wpcf7_contact_form_shortcode" filter, the modifications are visible in the ContactForm administration page (perfect), however when editing a post for example, I don’t see the shortcode alterations when I select a ContactForm using the Gutenberg CF7 block.

    Thanks for this great plugin ! Go on, you’re doing great!
    I am a developer and I recommend this plugin to everyone. 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    The wpcf7_contact_form_shortcode filters are applied to the [contact-form-7] shortcode output. Block Editor’s contact form selector doesn’t use shortcode, so wpcf7_contact_form_shortcode doesn’t affect the selector’s behavior.

    Thread Starter Clovis Grodecoeur

    (@brainstormer59)

    Thanks for your quick response.

    I totally agree with you, as it stands the Block Editor’s contact form selector doesn’t use shortcode.
    But the Block Editor’s contact form selector creates the HTML output with a [contact-form-7] shortcode inside.

    <div class=”wp-block-contact-form-7-contact-form-selector”>[contact-form-7 id=”XXX” title=”YYYY”]</div>

    So it would be very interesting to apply the filter here as well or to have a way to modify the rendering.

    In fact for a specific need, I add an attribute to the shortcode, and when the shortcode is added via the “Block Editor’s CF7 Selector”, I no longer have that attribute.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Shortcode alterations not apply in Gutenberg block’ is closed to new replies.