Set up a contact form 7 on Wordpress

From EN Ikoula wiki
Revision as of 12:34, 11 September 2019 by Aouarab4ab79 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

es:Configurar un formulario de contacto en WordPress en:Set up a contact form 7 on Wordpress fr:Mettre en place un formulaire de contact sur Wordpress it:Imposta un modulo di Contact Form 7 su WordPress


Introduction


You will see in this article how to set up a contact form on Wordpress. We will use the following plugins:


Installation contact form 7 Wordpress


Everything will happen through the Wordpress admin page, sign in to your Wordpress admin page.


Go to "Plugins" and click on "Add New" :

Search plugins on wordpress


Search for "Contact Form 7" and click on "Install Now" :


Adding the Contact Form 7 extension



Do exactly the same thing for the "WP Mail SMTP" plugin


Then go to "Plugins" and activate the plugins that we just installed via the "Activate" button:


Enable WordPress plugins contact



Configuration Contact Form 7

We will initially configure the plugin "Contact Form 7" which will be used to layout the form. To do this, go to "Contact" and click on "Add new"


COnfiguration contact form


Here you can define the form you want:


Writing the contact form


For more information about the syntax and the different fields available, we invite you to follow this link : https://contactform7.com/editing-form-template/


Here, the part that interests us the most is the tab "Mail", in the field "To" you can define to which email address the email will be sent:


Configuration mail


Once your form is configured, go all the way down and save via the "Save" button The interface will then return you a code like this:


Generation of the shortcode for the contact form


 [contact-form-7 id="10" title="My Form"] 


This code will be put on a Wordpress page that must be created or in a page that you already have. The form will then be displayed:


Overview of the contact form


The form is created, it remains only to configure the sending of mail via the plugin "WP Mail SMTP".


Configuration WP Mail SMTP

Go to "Settings"> "WP Mail SMTP":


Configuration WP Mail SMTP


Here is the configuration to perform:


Settings


Settings 2


  • From Email: Enter your email address this one will be used for sending mail (this mailbox must exist)
  • From Name: Indicate by which name will be sent the mail
  • Mailer: Choose "Other SMTP"
  • SMTP Host: ndicate your mail server so if my domain name is toto.com : mail.toto.com
  • Encryption: None
  • SMTP Port: 25
  • Authentication: ON
  • SMTP Username: your email
  • SMTP Password: the password of your email address


You then have the possibility to test an email sending via "Email Test":


Send email test


Once done sending mail via your form should work without problems

Security

For reasons of security, it is 'highly recommended' to set up a "captcha anti-robot" it will allow as the name suggests to avoid robots spamming your form and therefore your mailbox .


For that you have to create a public and secret key with google: https://contactform7.com/recaptcha/ (This requires a Google account however) and follow the procedure:


Copy the key pair into the WordPress admin screen of the site you have saved.


  • Go to the menu Admin Contact> Integration.
  • Find the reCAPTCHA panel and click Configure Keys.
  • Copy the site key and secret key into the fields and save them.
  • Finally, place a reCAPTCHA tag ([recaptcha]) in the content of your contact form.

Catégorie: WordPress Catégorie: Hébergement mutualisé