skip to Main Content

I have a WP with contact form 7, when testing I type the email,phone no, and message the form gets sent to the email but it comes empty.

Form:

<div class="col-lg-6">
    <div class="form-group text_box">
      [email email-527 placeholder "Your email address"]
   </div>
</div>
<div class="col-lg-6">
   <div class="form-group text_box">
       [tel tel-325 placeholder "Mobile No"]
   </div>
</div>
<div class="col-lg-12">
    <div class="form-group text_box">
        [textarea textarea-447 placeholder "Your message"]
    </div>
</div>
<div class="col-lg-12">
    <div class="form-group text_box">
        [submit class:btn_scroll class:btn_hover "Send Message"]
    </div>
</div>

Email received after submission:

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

Message Body:
[your-message]

I kept getting this empty message, even when the form goes through successfully.

2

Answers


  1. This looks like you didn’t edit the code for the email itself, in the second tab of the CF7 editor page of that form, but left the default code in the CF7 email tab.

    Login or Signup to reply.
  2. You are using custom names.
    So you need to use the names of your custom fields in the Mail tab.

    In your example go to Mail tab and replace:
    [your-email] with [email-527]
    and
    [your-message] with [textarea-447]

    Tel field is not default so you have to add it in your Message body in the Mail tab.
    e.g:

    Mobile:
    [tel-325]

    More info here: https://contactform7.com/setting-up-mail/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search