How to correctly create Contact Form

Updated: October 17, 2016

If you already built your contact form using Contact Form Element and you didn’t receive any email, you would check few important points:

  1. make sure your Contact Form element has filled Email Address to which would be sent information from contact form
  2. make sure your Contact Form element has filled Sender Email Address which is used as a From parameter. Some hostings require this email to have exactly the same domain as your website domain is so if you do not receive emails, contact your provider and ask him for Sender Email
  3. make sure you have filled correctly Email Content field – read below how to fill email content
  4. if both first and second points are correct on your side, make sure your WordPress sending emails at all.
    Easiest way to test it:
    Create New User in your WordPress Admin and select option to send email with password to newly created user. As email of user type an email used in contact form. If password doesn’t come, your WordPress has problem sending emails and you would contact WordPress support, or your hosting company to resolve problem with emails. Try also deactivate all additional plugins.
  5. take a look at Spam folder of your email client

Contact Form included in theme using standard WordPress mail functionality where emails received from the form using as sender email address wordpress@…
To modify this default sender information, you can use very simple but effective plugin which will change sender’s name and also set email address of sender: WP Change Default Email.

How to write Email Content

Each Input used in the Contact Form element include “Name” field. This “Name” field would store name of input and each input would has own unique name which is not used in another one input.
Lets say your contact form using input where visitor of website fill his name. You can type into “Name” field of this input text “sender-name”. To get value of this field, which visitor typed in the form, you have to use the same “sender-name” inside brackets {} in Email Content field. So in Email Content you can type message:
Email has been sent by {sender-name}.
In received email will be {sender-name} replaced with the value filled in the form by visitor. If visitor fill his name “John Doe” in the form, you will receive an email message:
Email has been sent by John Doe.

Following image displays correctly created Contact Form with example of whole Email Content related to created Inputs.

Author: Ivan Hudak

Support Manager
all themes, citadela layouts, plugins and graphics,
One time fee
Purchase Agency Lifetime Membership
Pre-sale Questions