WordPress.org

Forums

[resolved] Contact form 7 Modal & special mail tags (3 posts)

  1. bbowman02
    Member
    Posted 4 years ago #

    I am trying to figure out how to allow a Modal/lightbox window work with special mail tags. I have my "contact form 7" form appearing on all posts. When I fill out the form, the special tags work. When I added a Modal (lightbox effect), the form shows all the fields except the special tags. I just want the person receiving the email to be able to know from which post the user is filling out the form.

    My Message Body looks like this:

    From: [your-name] <[your-email]>
    Subject: [your-subject]
    Name: [_post_name]

    Message Body:
    [your-message]

    But the [_post_name] shows up [_post_name].

    I deactivated all my plugins to see if it was something to do with them, and removed any scripts that did not pertain to the contact form, but this still didn't work. If anyone has any ideas on what could be the problem, I would greatly appreciate it.

  2. Takayuki Miyoshi
    Member
    Posted 4 years ago #

    Contact Form 7: Special Mail Tags

    Note that the [_post_*] tag has value only when you put the contact form into content of a post or a page.

    If you can't place the form inside post/page content (loop), try using [_url] instead.

  3. bbowman02
    Member
    Posted 4 years ago #

    I feel stupid. I read that Note box so many times, but I wasn't thinking about putting in the loop. I got the modal from a tutorial that said to put the code right below the body tag. But once I put it in the loop, it worked perfectly. Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic