Wordpress: Create your own contact form - how it works
WordPress does not provide forms by default. To create a contact form, you therefore need a plugin. This practical tip explains how you can create your own form practically without programming knowledge.
Create a contact form with Contact Form 7
Use the free Contact Form 7 plugin to get started in the world of forms. This extension comes with German language files and an already completed form.
- Navigate to "Plugins"> "Install Plugins" in the dashboard and enter "Contact Form 7" in the search field. Click on "Install" and once the plugin has been installed click on "Activate".
- Now you will see the new entry "Forms" in the left menu.
- Click on "Contact Forms" and you will already see a standard form with which you can start immediately.
- To display the form on your website, copy the shortcode including the square brackets and paste it into the desired page or blog post.
- You can also create a new blank page and e.g. B. Call "contact". Then insert the shortcode for the form on this page.
- If you are already satisfied with the standard form, you do not have to do anything else.
Add your own fields to the contact form
If necessary, you can add additional fields and of course delete them. Various self-explanatory variants are available here.
- First open the form for editing and click on the form element you want to add in the top bar.
- Now a pop-up window opens. Set more details about the form field.
- The options differ depending on the field type.
- If you tick the "Mandatory field", the field must be filled in by the user.
- Enter a meaningful name for the field under "Name".
- If you enter something in the "Default value", this will always be shown in the form. The user can overwrite the entry if necessary.
- "Size" indicates the length of the field.
- With "maxlength" you determine the maximum number of characters that can be entered in this field.
- To display the field name within the field instead of above the field, check "Use this text as a placeholder for this field".
- Once all settings have been made, click on "Insert Tag" and the field will be displayed in the form.
- Attention: A field label is not automatically inserted. Would you like to For example, if you want to label the "Telephone" field, you must manually expand the [tel * telephone] tag as follows: Telephone [tel * telephone]
- Save your form.
- If you want to delete fields, you can easily do this in the editing view. If you e.g. B. If you don't need the subject field, delete the Subject [text your-subject] entry
Make settings for sending mail
Click on the "Email" tab to further customize the form. For example, you can add fields to the message or even set an autoresponder.
- If you have selected new form elements and would also like to receive them by email, you have to copy the new fields into the "Message Body".
- Under the entry "You can use these email tags in the following fields:" you will see all available fields.
- Copy the new fields including the square brackets and paste them at the desired position in the message body.
- By default, the plugin sends an email to the email address stored in WordPress. If you want to change this, you can do this in the "To" field.
- If you would like to send a copy of the email to the form sender, simply tick "Use email (2)".
- Here you also have the option of sending your own text as confirmation. Enter this in the "Message text" field.
How to set your own homepage in WordPress, read in the next post.