How to Add a Feedback or Contact Form to Your Website with BlueGriffon

Chapter 8: Creating an Email or Support Form

How to Add a Feedback or Contact Form to Your Website with BlueGriffon

by Christopher Heng,

Most websites have a way for their visitors to contact them. Blog sites usually have a comment section at the end of every page, while normal websites provide either their email addresses, or, more commonly nowadays, a form where their users can leave feedback. In this final chapter of the BlueGriffon tutorial, you will be creating such a form for your website.

This chapter assumes that you at least know how to use BlueGriffon to design a web page. If this is not true, please either start at the absolute beginning, with How to Create a Website, or with chapter 1 of the BlueGriffon tutorial. While I try not to make this chapter too heavily dependent on the previous chapters, so that users of the Feedback Form Wizard can also use it as a guide, a certain amount of prior knowledge is needed. If you use a different web editor, you may also want to check the list of Feedback Form Wizard Tutorials to see if there is one specifically written for your editor.

Goal of This Chapter

By the end of this chapter, you will have added a contact (or feedback) form to your website. If you have been following this tutorial from chapter 1, you will also have completed your website.

You Can't Just Design a Web Form and Expect It to Work

Web forms are tricky beasts for newcomers. Very often, a new webmaster will create a form using his/her favourite ("favorite" in US English) web editor, complete with bells and whistles, only to find that the form does absolutely nothing but look pretty.

A form is only one part of a complex machine. An analogy may serve to explain its place in the bigger scheme of things. Let's say that someone decided that they want to create an intelligent computer that can chat with them on lofty matters. They get an empty cardboard box, paint it black, attach pretty buttons on the surface with different labels, such as "Discuss Philosophy", "Poetry", and "The Meaning of Life". But when they press a button, any button, they are greeted with silence. Creating the user interface (the sleek black exterior and buttons with weighty topics) is well and good, but without some actual engine working its magic beneath the surface, they can click the buttons till they are blue and not get the desired results.

In the same way, a web form is just the user-facing component of a bigger whole. The actual engine driving the form is a computer program that is custom built to process the stuff coming out of the form. Designing a form without having a program to handle its output is like putting buttons on a empty cardboard box and expecting those buttons to actually do something.

But don't panic. For the feedback form that you'll be adding to your site, you don't actually have to write your own computer program, nor is programming knowledge necessary. You will be using the Feedback Form Wizard to do the hard work for you.

Parts of the Feedback Form System

Before you continue with this article, please go to the Feedback Form Demo and try it out. This will give you an idea of how your feedback form system will work. Please do this even if you have a lot of experience using web forms. The demo form uses the exact same engine that yours will use, since it was created using the Feedback Form Wizard. And don't worry about spamming me with that form; email sent through it is automatically deleted, so feel free to test it to your heart's content.

From that brief experiment with the form, you will probably notice that the feedback form system comprises 3 user-visible parts. In actual fact, there many more. However, you will only directly deal with the following 4 components.

  1. The Feedback Form itself

    The form itself is of course the most obvious part of the system. The Feedback Form Wizard will create this for you, and all you need to do is to plug it into your website. Its appearance (eg, the size of the fields, fonts used, colour, etc) can be customised ("customized") from within BlueGriffon.

  2. The Thank You page

    This is the page your visitors will see after they successfully submit a message. You will be creating this yourself in BlueGriffon.

  3. The Error page

    If your visitors fail to enter important information into the form, such as their email address, this page will be displayed when they try to send the message. (You can see this page in the demo by simply clicking the "Send Feedback" button without entering anything into the form.)

    Like the "Thank You" page, you will create this page in BlueGriffon.

  4. The Feedback Form Script

    The Feedback Form Script is the behind-the-scenes "brains" of the form. It is actually a computer program that processes the stuff entered by your visitors and transforms it into an email message. (A "script" in this context means a computer program.) It then asks the other programs on your web host's computer to send the email.

    (Yes, you read that right. The script doesn't actually send the email. It doesn't need to. There are programs on your web host's computer specially designed to handle email. Many programs on your web host's computer have specific functions, and they all work together to do complex tasks. It's like the division of labour you find in human organisations.)

    After handing off the message to the other programs on the system, the script then tells your visitor's web browser to go to your "Thank You" page.

System Requirements

For the feedback/contact form to work, the following are required.

  1. Your web host must allow you to run PHP scripts

    The script generated by the Wizard is written in a computer language called PHP. (See What is PHP? if you want to know more.) For it to work, your website must be placed on a web server that has PHP installed.

  2. Your PHP scripts must be allowed to send email

    Not only must your web server have PHP installed, it must be configured so that your PHP scripts are allowed to send email. This is generally the case for commercial web hosts, but is not necessarily true for free ones. Many free web hosts that permit PHP nonetheless disable its email-sending facility, presumably to prevent people from using their system to spam others. As such, if your site is on such a host, your form will probably not work correctly.

    Note that when I say "free web host", I include any situation where you didn't have to pay to have your website hosted. This include the free web hosting that sometimes comes with your internet broadband connection and the "starter websites" that you get for free when you buy a domain name from some registrars.

    That said, the feedback form script has been successfully used by thousands of sites on many commercial web hosts, including the one used by itself.

How to Create a Contact Form

Please follow the instructions below meticulously. Do not skip any step. In addition, I recommend that you do not work from memory, even if this is the second or third time you're doing this. Keep this article open in a window (or tab) of your web browser while you work, perhaps even highlighting the step you're following (just drag your mouse over the relevant sentence to highlight it) so that you remember where you are. It's easy to lose your place in the article because you will be switching back and forth between windows repeatedly.

  1. Go to the Feedback Form Wizard at

  2. Read the information on that page, and select the "Create a PHP Feedback Form (Requires PHP 5.2 or above)" option by clicking the radio button. (Actually, that button should already be selected by default, but click it again if you're not sure.)

  3. Click the "Go to Step 2" button.

  4. You should be brought to "Step 2" of the Wizard. Enter the following information.

    • Email Address

      Enter the email address at which you want to receive your visitors' comments. For example, enter "" (without the quotes) if that is your email address.

    • URL of Feedback Form

      Enter "" (without the quotes) into this field, replacing "" with the address of your website. Be sure to use the filename "feedback.html" since you have already used that URL (ie, web address) in chapters 6 (for your navigation menu) and 7 (site map) to link to this form. If you change the name now, all your links will be broken.

      Even if you have not followed my tutorial from chapter 1, it's easiest to just use "feedback.html" as the filename, since I will assume that you have used that name in the rest of this chapter. If you use a different name, you will have to make sure that all the rest of the addresses mentioned in this article match up, or your form will not work.

      Note that the use of "feedback.html" as the filename does not force you to call your form "Feedback Form". You can call it anything you like, eg, "Contact Form", "Contact Us", "Support", "Feedback", "Help", "Comments", "Drop a Note" or whatever. It's just a filename; it has nothing to do with what you call your form, or how you describe it to your visitors. That is, nothing stops you from naming the file "feedback.html" and calling it a "Support Form" or "Contact Form". As such, I strongly recommend that you just use "feedback.html" for the filename. The procedure in this chapter is already complicated enough without your having to mentally juggle a name that does not match the tutorial's instructions.

      If you choose to ignore my suggestions and change the filename anyway, please remember the recommendations given in How to Create Good Filenames for Your Web Pages and not to use capital letters or spaces.

    • URL of "Thank You" Page

      Enter "" into this field, without the quotes and after replacing "" with your site's actual web address. Once again, the same stuff about changing filenames that I mentioned above applies.

    • URL of Error Page

      Enter "" into this field. As usual, don't include the quotes, and use your actual web address in place of my "" placeholder. And again, remember what I said above about changing filenames.

    • HTML family to use

      Scroll down slightly to find the line "HTML family to use" in the "Advanced Options (Optional)" section. It should show "Compatible" by default. Click the down arrow and select "HTML". (As you may recall, you allowed BlueGriffon to use "HTML5" as the document type when you created your page in Chapter 1, so we want to make sure that the code generated by the Wizard matches this.)

  5. Scroll down and read the "Terms of Use: Licence Agreement (Required)" section. If you agree to the terms, indicate it in the form and click the "Generate script" button.

  6. The Wizard will then create a script and form for your site using the information you supplied. Do NOT close the page that is displayed. Leave it open as you work on the next few steps.

How to Save the Feedback Form Script Without Introducing Problems

  1. For the purposes of this section, you will need to start up a plain text editor. If you have been following this tutorial since at least chapter 5, you will remember that this is the editor you used to save the CSS code for your navigation menu.

    For the benefit of those who have forgotten what this means, if you use Windows, just start up Notepad. You can do this by clicking the Start menu (the button on the bottom left of your screen) and typing "notepad" (without the quotes), and click the "Notepad" line that appears. If you use a Mac, you probably should use TextEdit, which comes with your system. (As I mentioned in earlier chapters, I don't use a Mac, so you will have to figure out how to start up that program yourself.)

    Important: do NOT use any word processing program like Microsoft Word, Office, Wordpad, OpenOffice, LibreOffice and the like. If the program you want to use allows you to do things like underline text, put words in bold or italics, or anything fancy, then it is probably the wrong program. You should not be able to do such things in a plain text editor.

    Anyway, start up your text editor. It should show a blank page. Then switch back to your browser to the results page of the Feedback Form Wizard.

  2. Click your mouse once in the box located in the "Feedback Form Script" section. The contents of the box should automatically be highlighted. (If it isn't, you will have to manually drag your mouse to select everything in the box. Make sure you get everything.)

  3. Click your right mouse button while the mouse pointer is hovering over the highlighted area. The right click menu should open. Click "Copy".

  4. Switch back to your text editor and paste the results. If you're using Notepad, you can paste by clicking "Edit | Paste" from the menu, that is, clicking "Edit" from the menu bar, followed by "Paste" in the drop down menu that appears.

  5. A lot of seemingly gibberish text should appear. Do NOT change anything you see, not even to add blank lines. Even though some of the words look like English words, the entire thing is a computer program. Modifying anything may cause the script to fail to work correctly.

    Immediately click "File | Save As..." from the menu.

  6. A dialog box should appear. Navigate to the same folder where you placed your home page (index.html). Make sure you remember to do this. Don't save in the default location provided by Notepad (or whatever text editor you are using).

  7. Type "feedback.php" in the "File name" field. If you are using Notepad, make sure you include the quotes, that is, literally type "feedback.php", quotes and all. If you don't include the quotes, Notepad will save it as "feedback.php.txt" behind your back without telling you, and you won't be able to detect that it has done this unless you have configured Windows to show you the full filename.

  8. Click the "Save" button to save the file.

  9. Once you have saved the file, close (ie, quit) your text editor so that you don't accidentally modify the program by mistake. You won't need it any more.

How to Insert the Feedback Form

  1. Start up BlueGriffon if you have not already done so.

  2. In chapter 7, you have already created multiple pages for your website using your home page as the template. Repeat the process for a new page, this time saving the page as "feedback.html" (without the quotes) in the same folder as your home page. This is important. Even if you have created additional subdirectories for some of the other pages of your site and placed your files there, your "feedback.html" should be in your site's main directory, since all the URLs you entered into the Wizard earlier assumed that.

    In addition, remember to change the TITLE field for that page in "Format | Page Properties" to "Feedback Form" (without the quotes). (Or if you prefer, change it to "Contact Us", "Contact Form", "Support", "Help" or whatever.) Change the heading you placed at the top of your page accordingly as well, and delete whatever content you don't want for that page.

    For those who have not followed this tutorial series from the chapter 1: just create a new page for your feedback form using whatever procedure you are accustomed to using, but save the page as "feedback.html" (without the quotes) in the same directory as your home page. If you think the previous sentence sounds too vague, and you don't know how to do this, you probably need to start from chapter 1.

  3. Click "File | Save" to save the file before you continue.

  4. Switch back to the Wizard's results page.

  5. Click somewhere in the box in the "HTML Code" section. The contents of the box should automatically be highlighted. Click your right mouse button and select "Copy" from the pop-up menu.

  6. Return to BlueGriffon. Decide where you want the form to appear. For most people, it should be under your heading in the right column. Click that spot with your mouse to put your text cursor there.

  7. Click the "Source" button near the bottom of the BlueGriffon window. If you recall from previous chapters, this will take you to the underlying HTML code for your web page. Since you have already positioned your cursor in the previous step, your text cursor should be at the approximate spot where you want the form code to be inserted.

  8. Click "Edit | Paste" from the menu. The HTML code from the Wizard should appear.

  9. Click the "Wysiwyg" button near the bottom of the BlueGriffon window. You should now see your form on the page. Don't worry if the fields are too narrow. We will adjust the appearance in the next section.

How to Customise the Form Without Breaking It

If you find the feedback form adequate for your needs, and don't want to fiddle with its appearance, feel free to skip this section. This part of the tutorial is for those who want to customise how it looks.

  1. How to Adjust the Width of the Name and Email Fields

    Click the box next to "Name". (There should be no visible changes when you do this.)

    Click "Panels | Style Properties". A side panel with the title "Style Properties" will appear somewhere on your monitor.

    Click the line that says "Geometry" in that panel. The options related to the size of the field should appear.

    By default, the Width line should display "12.25em". Click to put your cursor in that field.

    If you want the field to always stretch up to fill, say, 70% of your right column, change the contents of that field from "12.25em" to "70%" (without the quotes). You can use your arrow keys to move about in that field as well as your Delete/Backspace keys to delete its existing content. If you find that BlueGriffon resists your deleting everything (by resetting the field back to its default), try highlighting everything in that field and typing "70%" over it. You should be able to see your field width change on your page as you type.

    To change the width of the Email field, click the box next to "Email" on your web page. The contents of the Style Properties panel should change immediately to reflect the settings currently in place for that field. Modify the "Width" field in the panel so that it has the same value you set for Name.

    (Technically, your Email field does not have to have the same width as Name. However, since that results in a form that looks somewhat lopsided, many people prefer to set it to the same width. You are of course not obliged to do this.)

    Note: the widths of the various fields do NOT affect how much your visitors can type into them. Even if you make the widths horrendously narrow, your users can still enter a complete novel into them if they wish, since the web browser will automatically scroll as they type. In other words, changing the widths is merely something you do to make the form look pleasing to you. You don't have to worry about how wide they need to be to accomodate your visitor's name and email address. This applies to the Comments field as well.

    You can close the "Style Properties" panel by either by clicking the "X" button at the top left corner of that panel or by choosing "Panels | Style Properties" from the menu again.

  2. How to Adjust the Width and Height of the Comments Field

    Click the Comments field. If you have already closed the "Style Properties" panel, open it again by clicking "Panels | Style Properties" from the menu.

    Expand the Geometry section if necessary. (It should already be expanded, since you did it in the previous step. However, if you have collapsed it by clicking it again since then, for example, to take a look at the rest of the panel, you will need to click the Geometry heading again to open that section.)

    As before, you can adjust the width of the Comments field by modifying the number in the "Width" field. For example, replace the default "12.25em" with "75%".

    If you find the height of the field to be too short or too tall, enter a value into the "Height" field. This time, however, you should not use "%" as a unit. Try using "em" instead. For example, enter "15em" (without the quotes) to make the Comments field take up approximately 15 lines of text.

    When you're done, close the Style Properties panel.

  3. How to Change the Words on the Send Feedback Button

    If you don't want the button at the bottom of the form to say "Send Feedback", doubleclick the button. (That is, click the button twice in the same spot in quick succession.)

    A dialog box with the title "Insert or edit a form input" will appear. Change the words "Send Feedback" in the "Value" field to whatever you like.

    Click the "OK" button when you are done.

  4. Changing the Displayed Labels for the Fields

    If you decide that you don't want the fields to have the labels "Name", "Email" and "Comments", preferring instead some other words, simply click to put your text cursor on your web page and modify those words accordingly. Those labels are simply ordinary words inserted into your web page, and can be changed to whatever you want. For example, you can change "Name" to "Full Name", "Email" to "Email address", and "Comments" to "Feedback" or whatever. You can also change the fonts for those words in the usual manner.

Create the Thank You and Error Pages

The Thank You and Error pages are just straightforward web pages. As such, you should have no trouble creating them in BlueGriffon. Just do the same thing you did in BlueGriffon when you created your other pages in chapter 7. Remember to change the TITLE fields of those pages to say something like "Feedback Sent" (for the Thank You page) and "Error" (for the Error page).

For those who are unsure what to write for your Thank You page, say something like the following:

Your message has been sent. Thank you for your feedback.

Actually, you can say whatever you want. The above is just an example. The Thank You page is merely to let your visitors know that their comments have been sent. Otherwise they will wonder if clicking that button had any effect.

If you're not sure what to say on your Error page, write something like this:

It looks like you forgot to complete one or more of the required fields. Please return to the form and try again.

Again, if you don't like my choice of words, just say whatever you want.

Save the Thank You page as "thankyou.html" and the Error page as "error.html" in the same folder as your home page and feedback form. Do not use any other names. Do not use capital (uppercase) letters. Do not add spaces to the filenames. These are the exact same names you entered into the Feedback Form Wizard when you created the script; using different names now will result in your feedback form not working correctly, since they will not match those your script is programmed to use.

Publishing the Feedback Form Files

Upload (ie, publish) all the files to your website using FileZilla in the usual way. (For those who came to this chapter from outside, and don't know what "the usual way" means, read How to Use FileZilla to Upload Your Files. Alternatively, read chapter 1 of this tutorial.)

Make sure that you upload all four files: the feedback form script ("feedback.php"), the web form page ("feedback.html"), the Thank You page ("thankyou.html") and the Error page ("error.html"). And all of them must be placed in the same folder as your home page ("index.html").

How to Test the Feedback Form the Correct Way

Since a feedback form is more than just a normal web page, there are many additional things you need to test before you can be sure it works as it should.

  1. Check that your navigation menu button links correctly to your form

    Go to the home page of your website. Click the "Feedback" button (or "Contact" or whatever you called it) in your navigation menu to go to the form. You should arrive at the form page you just uploaded. If you get an error message saying 404 File Not Found (or words to that effect), it means that you gave your feedback form a different name from that used in your navigation menu button. Either fix the link in your navigation menu so that it points to the actual file you created (see chapter 6 for this), or redo this chapter and give your feedback form page the same filename you used in the menu.

    If you don't have a navigation menu, just go to the next step.

  2. Check that your site map links correctly to your form

    Before testing your feedback form, go to the site map you created in chapter 7. There should be a link to your feedback form there. Click it. If you end up at your feedback form again, go to the next test. If you don't, you have a mismatch between URL you used in the Site Map and the one you actually used when you created the file. Fix it so that they both refer to the same address.

    As before, if you don't have a site map, just skip to the next step.

  3. Check that you named your Error page correctly

    For this test, you should be at your feedback form page. Click the "Send Feedback" button. Yes, I know you haven't entered anything into any of the fields. That's the whole point.

    Since all the required fields on the page were empty, you should end up at the Error page you created earlier. If so, all is fine. That is the way the form is supposed to work. Go to the next test.

    If you get a File Not Found error, it means that the URL you gave to the Feedback Form Wizard did not match the URL of your Error page. This may mean that you gave your Error page a different filename from that which you specified to the Wizard. Or you may have made a typographical error when you typed the URL of your Error page into the Wizard. Unfortunately, this error probably means that you have to redo this chapter again.

  4. Check that you named your Thank You page correctly

    Go back to your feedback form page. Now complete all the fields in the form and click the "Send Feedback" button.

    You should end up at your "Thank You" page. If so, go to the next test.

    If you get a File Not Found error, it means you have a URL mismatch. The address you furnished the Wizard did not match the actual address of your Thank You page. Redo this chapter to fix the error. This time, check carefully that the URLs you type into the Wizard are correctly entered with no typos. (Really check, letter for letter.) In addition, use the filenames exactly as I suggested in this chapter; don't even vary the names by putting spaces or capital letters in the names. Those are the causes of many problems with URLs not matching.

  5. Check that you actually receive the mail you sent

    Just because you get the Thank You page doesn't mean that your email will arrive safely. As mentioned earlier in this article, the Thank You page merely indicates that the script has handed the message to the specialised email programs running on your web host's computer. It doesn't mean that those programs have delivered your message or anything like that. In fact, you will even get the Thank You page if you made a typing error in your email address and your message goes nowhere because nobody can deliver emails to a non-existent address.

    Different web hosts also deliver email sent from web forms at different rates. On my current web host, emails sent from my web forms appear instantly. Unfortunately, not all web hosts are equally prompt. On one of the web hosts where I have tested this form, messages sent from forms take many hours before arriving. If you are using such a host, I guess you will just have to be patient.

    If you do not get your test message after waiting at least a few hours, see the checklist of things to do when you don't get your email. You may also want to try the obvious step of making sure that you entered your email address correctly into the Wizard.

Congratulations! Where to Go From Here

Congratulations! You have not only successfully installed a feedback form on your website (a task considered one of the most difficult among new webmasters), you have also completed the design and creation of your entire website. And it's not some trivial play site, but a multi-page, fully functional website with a professional looking navigation menu, a working contact form and site map.

Before you go and celebrate your latest accomplishment, I would appreciate if you would take the time to tell others about by linking to it. Some linking suggestions can be found here, but, frankly, feel free to link to any page you like. Please don't forget as you move on from here with your new site.

There is more to website creation than simply designing its pages. A few of the other things to do are mentioned in my overview guide How to Create a Website, but you can also take a look at my Site Map to see the list of other articles that deal with frequently required webmaster tasks.

All the best for your site!

Copyright © 2015-2017 Christopher Heng. All rights reserved.
Get more free tips and articles like this, on web design, promotion, revenue and scripting, from

You are here:

Top » Getting Started with Your Website »

How to Create / Make Your Own Website: The Beginner's A-Z Guide » List of All BlueGriffon Tutorials »

thesitewizard™ News Feed (RSS Site Feed)  Subscribe to newsfeed

Do you find this article useful? You can learn of new articles and scripts that are published on by subscribing to the RSS feed. Simply point your RSS feed reader or a browser that supports RSS feeds at You can read more about how to subscribe to RSS site feeds from my RSS FAQ.

Please Do Not Reprint This Article

This article is copyrighted. Please do not reproduce or distribute this article in whole or part, in any form.

Related Articles

New Articles

Popular Articles

How to Link to This Page

It will appear on your page as:

How to Add a Feedback or Contact Form to Your Website with BlueGriffon

Link to Us
Site Map

Getting Started
Web Design
Search Engines
Revenue Making
Web Hosting
Perl / CGI
.htaccess / Apache


Free webmasters and programmers resources, scripts and tutorials Free How-To Guides
Site Design Tips at
Find this site useful?
Please link to us.