Tek Eye Logo

Tek Eye

Adding a Feedback Form to a ↓markdown↓ CMS Website

The ↓markdown↓® CMS (md-CMS) is a lightweight Content Management System (CMS), used for easy website management and article publishing. To help with website user engagement md-CMS supports website visitor feedback via a simple form. How do you enable the website feedback form in md-CMS? This is covered in this article.

↓markdown↓ CMS

Using a CMS to run and publish a website makes sense. A CMS makes website maintenance and article publishing easier, no need to hand craft HTML, CSS and JavaScript. This frees up time to produce more content, and time for other tasks, such as Search Engine Optimization (SEO). One part of SEO, and improving the website presence, is to allow people to comment on articles. However, allowing article comments can be pain, due to spamming, trolling and other unwanted comment entries. For md-CMS a feedback form can be used by website visitors to send a comment on an article. To reduce spamming, the feedback form makes use of Google's reCAPTCHA tool.

Preparation for the md-CMS Feedback Form

To enable the md-CMS feedback form functionality the following is required:

  • An email address is required, to which the submitted form data is sent.
  • Sign up for Google's reCAPTCHA tool, choose reCAPTCHA v3 and register your domain. You will need a Google account to use reCAPTCHA.
  • In the md-CMS configuration file, site-config.php, set the email address, site domain, reCAPTCHA site key and the reCAPTCHA secret.

Adding the Website Feedback Form to a md-CMS Website

When the feedback form is configured for a md-CMS based website, any page on the website that has the page meta-data Comments field set to Yes, i.e. in the page header, will show a feedback box at the end of the page. See the bottom of this web page for an example of the feedback form in action.

To configure the feedback form modify the configuration file site-config.php in the root directory. (To see how to create the site-config.php file see the article Website Home Page for ↓markdown↓ CMS.) Add the following configuration fields:

  • RECAPTCHA_SITE - set to your websites reCAPTCHA site key.
  • RECAPTCHA_SECRET - set to your websites reCAPTCHA secret key.
  • FDBK_EMAIL - set to the email address of the person dealing with the website feedback.
  • FDBK_DOMAIN - set to the root domain of the website, e.g. example.com.

Here's how they would look at the end of the $MD_SETTINGS array in the file site-config.php.

    "RECAPTCHA_SITE" => "YOUR_reCAPTCHA_site_key_goes_here_ABC123",
    "RECAPTCHA_SECRET" => "YOUR_reCAPTCHA_secret_key_goes_here_123A",
    "FDBK_EMAIL" => "feedback.receiver@example.com",
    "FDBK_DOMAIN" => "example.com"

Once these items have been configured for your specific website settings in the site-config.php, a feedback form will appear at the end of any md-CMS web page that has the page header field Comments set to Yes.

Enabling Comments on an Article

In md-CMS the comments feedback form is enabled on a page by page basis. To enable comments on an article set the Comments article meta-data value to any value other than No, for example Comments: Yes. (See the article Web Page Title Tag in ↓markdown↓ CMS for an introduction to article meta-data). For example with comments enabled for this web page the article meta-data is similar to the following:

Title: Adding a Feedback Form to a ↓markdown↓ CMS Website
Published: 2020-08-22
Comments: Yes

With the meta-data setting Comments added for an article the comment feedback form then displays at the bottom of the article. See the bottom of this post for an example.

A visitor to the page can fill out the feedback form and it will post the comment back to the website server. The server then sends an email to the email address set in the configuration file. The email includes the web address of the page that the comment was entered on. This allows the person dealing with feedback to know the website page to which the comment refers. If required that page can then be modified to respond to the comment.

See Also

Author:  Published:  

ShareSubmit to TwitterSubmit to FacebookSubmit to LinkedInSubmit to redditPrint Page

Do you have a question or comment about this article?

(Alternatively, use the email address at the bottom of the web page.)

 This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

markdown CMS Small Logo Icon ↓markdown↓ CMS is fast and simple. Build websites quickly and publish easily. For beginner to expert.

Articles on:

Android Programming and Android Practice Projects, HTML, VPS, Computing, IT, Computer History, ↓markdown↓ CMS, C# Programming, Using Windows for Programming

Free Android Projects and Samples:

Android Examples, Android List Examples, Android UI Examples

Tek Eye Published Projects