Contact Form 7 Dynamic Text Extension
HTML tags in Dynamic Fields (1 post)

  1. SandBird
    Posted 3 years ago #

    Hi and thanks for this great and most valuable extension!

    I admit that I posted similar message in the Contact Form 7 support forum but thought that since I need this specifically to the Dynamic Text field someone will be able to help me here.

    I'm populating some data using a shortcode. The data from the shortcode is formatted in simple HTML (it has html tags).
    What I'm trying to do is use the pre-exisitng generated format in the email message. I made sure that "Use HTML content type" is checked but all I get is a stripped version of text, in that specific field reference data.
    When I use other HTML tags in the message body it works but not if the tags exist in any field references codes.
    I assume, for security reasons, that all HTML tags within the reference fields are automatically stripped.
    Is there any way to bypass that for that specific field (especially since I'm the one who's populating it and not a user)?

    I found out where I can disable the tag stripping function it's in line 581 in the file classes.php:
    $replaced = strip_tags( $replaced );

    Commenting it out provides the results I wanted however it also shows any html tagging the user may input which isn't good practice.

    Is there any way to do so per request of specific dynamic text field?

    Any help/input is much appreciated, thanks again!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7 Dynamic Text Extension
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic