You can create as many contact forms as you want and you can add a contact form to any post or page, anywhere in your site.
Our contact forms are created and edited with the plugin called “Contact Form 7″.
Adding a Contact Form to a page
- Go to "Contact->Edit"
- You will see a default form already created.
- Look for the 'shortcode" that looks something like this: [contact-form 1 "Contact form 1"]
- Copy and paste that code into any page.
- If you are using a new BlogSite, we have included the code on your "Contact" page already.
Editing the Contact Form
To add fields to a form, you need to make make tags for them and insert them into the ‘Form’ field.
You’ll find unfamiliar codes already in the ‘Form’ field, for example,
[text* your-name]. These codes are called “tags” in the vocabulary for Contact Form 7.
A tag has a rather complex syntax, but don’t worry! You don’t have to learn it. You can use the “Generate Tag” tool on the right side of the page to generate as many tags as you want.
The second word in the tag is its name. For example, the name of [text* your-name] is ‘your-name.’
This name is important as it is used later in your mail template.
Editing the Mail Settings
You need to setup the email settings as well to make sure the information entered by visitors gets to you.
You can edit mail templates in the ‘Mail’ field set as you did with the form template, adding tags as placeholders for the information users input.
Any of the fields you add to the "Form" section need to be added to the email section as well, or they will not be sent to you.
Tags in a mail template contain only one word in brackets and look like [your-name].
In mail, [your-name] will be replaced by the user’s input value, which is submitted through the corresponding form field, which, in this case, is [text* your-name] .
- You create a form with the field [text your-name] - this is a text input that we are calling "your-name".
- You add the field [your-name] in the mail section.
- A user fills out the form and whatever they type into the [text your-name] area, gets added to the email sent to you where you added [your-name]
As an example, you might want an email that sends you the user's name, email, subject and message:
You could add the following to the body portion of the mail:
That would result in an email to you that looks like this:
Subject: Hi, interested in your services.
Message: Some details about what I am looking for.