Click to go to USFreeAds' website
About
This website is all about strategies to help you grow your niche store empire. I have many Build A Niche Store sites and use the strategies that I share here.
Newsletter
Subscribe to my posts and get all of the latest tips and strategies sent directly to your email!
Delivered by FeedBurner
RSS Feed
Get the most recent posts and comments sent to you directly by subscribing to my RSS feeds!
Subscribe to RSS! Subscribe to RSS Comments!

Apr
21

How to Add a ‘Contact Us’ Form to Your Site

RochelleHow To..., Strategies

 

One thing I’ve been putting off is adding a ‘Contact Us’ form on my niche stores. Sure, I could do this fairly easily by simply adding a ‘Contact Us’ link and including my email address. But if I do this I risk having spam harvesters collecting my email address and filling my inbox with spam. I do have a program I purchased that allows me to hide my email address but it is fairly complex to set up so I’ve put this on the back burner.

Then along comes BANS forum member, mistermickster, who told me he created his own ‘Contact Us’ form specifically for Build A Niche Stores and asked if I wanted to post instructions on how to add it to niche stores. First I checked out what he had done, then I installed his method on one of my sites. After doing these two things my answer to him was an immediate yes.

Why should you bother adding a ‘Contact Us’ form to your site? There are several reasons. First, it makes your site look that much more professional, giving you an edge over competition for your niche. Second, it allows visitors to ask questions. This is a great way to get feedback or ideas to improve your site.

When site visitors use your ‘Contact Us’ form then their email is sent to the email address you entered into your site’s ‘Security’ tab in Admin. It is likely that you won’t want email from every site you have going to the same address so in the steps below I’ll explain how to create emails for every site you have and link them to one account for easy retrieval and viewing.

One of the best features of this mod is that it uses captcha images. This means visitors have to enter the characters they see in a box into a text field. This additional step helps prevent spam harvesters. It is an extra security field for you.

I really appreciate mistermickster sharing this mod with me and allowing me to share it with you.

 

My instructions to add a ‘Contact Us’ form on your site:

Step One
  Download the contactus.zip file, save it to your computer, and extract its contents.
Step Two
  Upload the contact.php and captchaimg.php files from the zip file to your site’s root folder, where your site’s index.php is located (you can upload these files using an FTP program or through your site’s cPanel File Manager.)
Step Three
  Go to the FrontControl.php file (click here if you don’t know how to do this) for your site.
   
  Save a copy of the original code (click here for instructions on how to do this).
   
  Search for the following code:
           }
         return $f;      }

function printPagesStaggeredChildren($id, $arrChildren, $level = 0)
{

  Replace the above code with the contents of contactus01.htm. Save changes and view site for errors.
Step Four
  Log in to your site’s Admin and click on the ‘Template‘ tab and ‘styles.css‘ link for the template you are using.
   
  Save a copy of the original code (click here for instructions on how to do this).
   
  Copy the contents of contactus02.txt and paste it to the bottom of your style.css. Save changes and view site for errors.
.

As I said above, all emails are sent to the address you entered in your site’s Admin Security tab. If you are like me you have entered the same email address for every site you have. You won’t want emails from various sites sent to one email because you’ll have no idea what site the emails are coming from or referring to.

There are several ways to deal with this. The solution I have chosen is a simple one that will allow you to add unique email address for every niche store you have and let you check them all in a single place. No, I don’t mean your inbox, such as Outlook or Outlook Express. This is even easier than that.

What I suggest requires creating multiple accounts with Google’s gmail. For those who may be worried, you are allowed to have multiple gmail accounts as long as your purpose for the accounts doesn’t violate Google’s TOS. Using your email accounts for ‘Contact Us’ purposes only is an acceptable use of multiple accounts.

I realize not everyone will want to use Google’s gmail. If you don’t want to do this then I’m afraid I’m leaving it up to you to figure out how to deal with the email address aspect of creating ‘Contact Us’ forms. I apologize but I simply don’t have the time to write instructions for every method available for doing this.

 

My instructions to add unique email addresses to every niche store you have:

Step One
  Go to Google’s gmail and create a primary email account with Google’s gmail. By primary I mean the account that you will log into to check all emails you may have received from all your niche stores.
   
  I suggest you name it something like, ‘MainEmailAccount@gmail.com‘ or ‘MyMainNicheStoreEmails@gmail.com‘ to remind you of the purpose of the email account. The name you want may be taken already so play around until you find an available name.
Step Two
  Log in to your first niche site’s Admin and click on the ‘Security‘ tab. Enter the primary gmail email address you created in step one above in the ‘Email‘ section but modify it as follows:
 
MainEmailAccount+NicheStore01@gmail.com
  Save changes (this will automatically log you out of Admin)
Step Three
  Repeat step two of these instructions for every niche store you add a ‘Contact Us’ form to. For every store add a unique +NicheStoreDescription so you will know what store an email is coming from.
.

Now that you have created a primary email account and unique variations of this account for each niche store you need to periodically check your primary account for messages. When you log in you will see all your emails in one centralized place. But you won’t know which niche store your emails have come from just by looking at your inbox:

Image of emails in your Google gmail inbox

To figure out which store your email came from you need to click on an email to open it. Once you have done this you need to click the ‘show details‘ link:

Image of 'show details' link for an email message

Now you can see what email address the message was sent to, and this tells you what store the email is coming from and referring to:

Image of email address message was sent to

That’s it. You now have a ‘Contact Us’ link automatically added to your site’s Store Navigation sidebar, a unique email address set up for each of your niche stores, and an easy way to read any messages you are sent. Go ahead and click it to send yourself an email to verify that it works. Pretty nifty, eh?

A big thank you to Dave for simpifying the unique email aspect of these instructions.

Rochelle

2008-07-21 Edit: Antonio attempted to share how to change the entry field titles, as well as change colors, but the code he posted wouldn’t show correctly. He emailed it to me so I can post it with the code showing. Here is what he sent me:

“In order to change the entry field titles (like “Name:”, “Subject:”, etc.), just do this:

1. In the styles.css template, insert the following AT THE END of the Contact Us code:

td#contact {

font-size: 1.2em;

color: #ffffff;

}

2. To change the page title color (Contact Us), go to the contact.php file and search for the following code:

<h1>Contact Us</h1>

and replace with the following:

<h1 id=’contact’>Contact Us</h1>

2. In your styles.css file, place the following code near the bottom:

h1#contact {

color: whatever-colour-you-like-here;

}

Antonio”

Related Posts:

  • How to Add a ‘Contact Us’ Form to Your Site and Display the Link in Your Footer
  • How to Ceate Google Alerts for Your Site
  • How to remove the ‘Contact Us’ link from sidebar and add it to the footer
  • How to Add StatCounter Code to Your Site
  • How to Add ‘Bookmark this Site’ and ‘Refer-a-Friend’ Links to your Site
  • How to Add ‘Refer a Friend’ Code to Your Site
  • How to Add Permalinks (or Link-Backs or Trackbacks) to your Site
  • How to Add ‘Bookmark This Site’ Code to Your Site
  • How to Add a Dynamic Sitemap to Your Site
  • How to copy the contents of Raw-BANS for a new BANS site
  • RSS feed | Trackback URI

    91 Comments »

    Comment by Bob
    2008-04-21 18:44:21

    Very nice mod., went in without a hitch. Off I go to update the other sites. THANKS!

     
    Comment by Dave Retterer
    2008-04-21 20:22:45

    That seems like it will work great. Alot of work though, creating all those email accounts. Try this

    “Store1.eMailAccount@gMail.com”
    “Store2.eMailAccount@gMail.com”
    “Store3.eMailAccount@gMail.com”

    That way all email is sent to one account but you still know were it came from. And the beauty about it is you don’t have to set up all those gMail addresses. Anything “Store*.” automatically gets sent to “eMailAccount@gMail.com”

    I hope this helps
    Later Dave

     
    Comment by Dave Retterer
    2008-04-21 21:24:56

    My bad they changed it up since I heard it over a year ago. It’s

    eMailAddress+Store1@gMail.com
    eMailAddress+Store2@gMail.com
    eMailAddress+Store3@gMail.com

    Sorry Dave

     
    2008-04-22 04:05:34

    brilliant Rochelle! just what i was looking for!

     
    Comment by Rochelle
    2008-04-22 05:56:24

    Dave,

    Thank you so much for simplifying this! I have modified these instructions to include your advice.

    Rochelle

     
    Comment by Dave
    2008-04-22 13:08:22

    Thanks so much for posting this, I was asking about this exact method on the forums and nobody responded :)

     
    Comment by DaveB
    2008-04-23 07:44:22

    Hi Rochelle,

    Thanks for providing all this great information! I implemented the Contact Us page without a hitch! Just sent you a tip to show my appreciation.

     
    Comment by Rochelle
    2008-04-23 08:51:54

    DaveB,

    Thank you! That was very kind of you.

    Rochelle

     
    Comment by Bill
    2008-04-25 19:25:34

    Thank you so much for this Rochelle.

     
    Comment by Arthur
    2008-04-28 13:20:30

    Hi, I can’ seem to find this file inside the htaccess file… Could someone please tell me where to locate this file
    }
    return $f;

    }

    function printPagesStaggeredChildren($id, $arrChildren, $level = 0)
    {

    Arthur

     
    Comment by Rochelle
    2008-04-28 14:12:32

    Arthur,

    The file you need to modify is FrontControl.php which is located in the cont folder. If you aren’t sure where to find this take a look at this post I wrote: http://www.nichestorestrategie.....ontrolphp/

    Rochelle

     
    Comment by Arthur
    2008-04-28 15:53:17

    Thanks Rochelle!
    It works like a dream :-)

    Arthur

     
    Comment by Sarah
    2008-04-28 18:49:50

    For being a newbie at all this, I am quite excited that this worked perfectly!!! I did the happy dance when I checked and it was all there! :-) My only question now is… I don’t understand how the email thing works with the formatting given
    eMailAddress+Store1@gMail.com
    eMailAddress+Store2@gMail.com
    eMailAddress+Store3@gMail.com

    So, I am to put my original email address plus the gmail address I created together? I just can’t grasp how the email is going to get to where it is supposed to go. :-) Probably a silly question to many of you but I gave my disclaimer above - I’m a newbie! :-)

    thanks,
    Sarah

     
    Comment by Rochelle
    2008-04-29 09:14:02

    Sarah,

    If you want to use gMail for the contact form then you will delete your non-gmail address from your site’s ‘Security’ tab and replace it with the gMail address.

    To use the gMail method explained here you will create an email account with Google. Let’s say you choose to create an email account using the term MyEmailAddress@gMail.com. You can use this email address for every BANS site you have by adding a descriptive phrase to it in the following manner (let’s say three of your sites are about betta fish, cat food, and dog collars):

    MyEmailAddress+BettaFishStore@gMail.com
    MyEmailAddress+CatFoodStore@gMail.com
    MyEmailAddress+DogCollarsStore@gMail.com

    Using this method you can use a single gMail account to create unique emails for whatever use you want. Emails sent to all of the above email addresses will all go to the one account you created. Because you added a descriptive phrase you will know where the email came from.

    So, you won’t use your original email at all. You will only use the gMail address.

    If this is still confusing please let me know and I’ll explain further. Don’t hesitate to tell me if you still don’t get this.

    Rochelle

     
    Comment by Arthur
    2008-04-29 10:42:28

    Rochelle-
    Do we need this section in our Privacy Policy content now that we’ve added a
    Contact Us form?

    If you require any more information or have any questions about our privacy policy, please feel free to contact us

    by email at website.stores+BQE@gmail.com.

    Arthur

     
    Comment by ameer
    2008-04-30 01:46:54

    Hi rochelle,

    I have been beating my head but i cant seem to find the code in frontcontrol.php that is to be replaced in Step three. By the way i am using Bans v.2.0.

     
    Comment by ameer
    2008-04-30 02:01:29

    Ok, so i went ahead and looked it up and the code that needs to be replaced is easily found in v 3.0 but not in v 2.0. Any suggestions what to replace in v 2.0?

     
    Comment by Denise Subscribed to comments via email
    2008-05-01 11:57:50

    Hi Arthur

    I’ve kept the section you mention in the privacy policy and turned it into a link to my contact page. It gives me another opportunity to use my keywords! Click my name above to see this.

    Denise

     
    Comment by Denise Subscribed to comments via email
    2008-05-03 12:30:20

    Rochelle

    Great instructions, which worked perfectly.

    Is it possible to put the “contact us” page in the footer? I have used your instructions to do this with the privacy policy, by hiding the content page. Of course, there is no content page to hide with the above MOD!

    Denise

     
    Comment by Rochelle
    2008-05-06 09:23:55

    Arthur,

    It is entirely up to you if you want to add your contact information to your policy page. I don’t, nor will I do so now that I’m adding the ‘Contact Us’ form to each site.

    Rochelle

     
    Comment by Rochelle
    2008-05-06 09:25:16

    Ameer,

    As far as I know you can only add this to v3 (or higher) BANS sites. If anyone figures out a way to add this to v1 or v2 sites please share how to do this.

    Rochelle

     
    Comment by Rochelle
    2008-05-06 09:27:10

    Denise,

    I don’t know how to move the ‘Contact Us’ link to the footer. Surely there is a way but I haven’t had the time to see if I can figure it out. If I do I will share.

    Rochelle

     
    Comment by kevin
    2008-05-08 12:28:29

    I made quite a mess. I followed the directions, but I did someting wrong. PLEASE HELP!
    These are the errors.
    On my home page at the top left corner.
    FrontControl.php File Type: PHP script text ——————————————————————————–

    When I click on any product picture in Ebay I get this.

    FrontControl.php File Type: PHP script text ——————————————————————————–
    Warning: Cannot modify header information - headers already sent by (output started at /home/boomer27/public_html/collectiblesbin/cont/FrontControl.php:6) in /home/boomer27/public_html/collectiblesbin/item.php on line 383

    I have tried copy and paste from my original PHP script with no change.
    Please help, Thank you.

     
    Comment by Rochelle
    2008-05-08 13:48:39

    Kevin,

    I just sent you an email.

    Rochelle

     
    Comment by Christopher Jay
    2008-05-27 15:28:39

    Great little contact page… and it appears I may be the only one with this problem. The install was simple and loaded just fine, however, the capthca image doesn’t appear and of course you can’t enter the code if you can’t see it.

    Plus the contact page does not appear in the admin content page section…
    I am using Ver.3.0

    Anyone with suggestions would be appreciated…

    Christopher Jays last blog post..Best natural hair loss treatment

     
    Comment by Rochelle
    2008-05-27 16:13:43

    Christopher,

    It sounds like the captcha.php file didn’t upload correctly. I would try uploading it again to your root folder (where your niche store’s index file is located).

    Regarding having the ‘contact us’ page show up in your Admin’s content page, it won’t show up there.

    Rochelle

     
    Comment by Christopher Jay
    2008-05-27 17:57:04

    Thanks Rochelle but unfortunately I have already done that without any luck. I have checked permissions also… this is the file I have: captchaimg.php which I imagine is the same as you have stated.

    Thanks

     
    Comment by Rochelle
    2008-05-27 18:11:22

    Christopher,

    Sorry, you are correct, I did mean captchaimg.php.

    The only thing I can think to suggest is to download the files again and start from scratch.

    Rochelle

     
    Comment by Christopher Jay
    2008-05-28 08:54:43

    Thanks Rochelle,

    I’ve done just about everything I can and still no image… I’ll try it on another site but I don’t see how that would make any difference.

    The sad part is it works for others and I never have any problems with other mods or scripts. It has to be some simple little thing. The only thing I am doing different is ftp’ng the css file instead of through bans admin and that shouldn’t have any bearing on the image.

     
    Comment by Christopher Jay
    2008-05-28 15:09:00

    Unbelievable, I just tried installing it on another site and still the same problem. Anyone with any suggestions would sure be appreciated….

    Christopher Jays last blog post..For Sinusitis Relief You Can Turn to Antibiotics

     
    Comment by Daniel
    2008-05-28 21:40:55

    Christopher: Go to the contact page for your site.
    When it comes up right click and go to View Source.
    Go to Edit >> Find and search for captchaimg.php
    does it just have ?

    also who is your host? They may have it to where .php files aren’t able to be viewed as images, I think some hosts may have it like that.

    Daniels last blog post..Update to the Auto Privacy Policy

     
    Comment by Christopher Jay
    2008-05-29 10:44:03

    Thanks for the reply, Daniel. Not sure what you meant about the “?” but the search did bring this up:

    I’ve spoken to my VPS host and now they are asking this:

    There are a lot of modules in php that are related to image creation, such as ImageMagick, etc.. If you can please confirm with your developer as to which module he is referring to, this will be helpful. Else, we can go ahead and compile this module for you. Let us know.

    I doubt if it matters which module they use but I am waiting to hear back from mistermickster to see what he thinks.

    Chris

    Christopher Jays last blog post..Social networking in Thailand

     
    Comment by Christopher Jay
    2008-05-29 10:46:13

    This code didn’t show up in the last message: img src=’captchaimg.php

    Christopher Jays last blog post..Social networking in Thailand

     
    Comment by Christopher Jay
    2008-05-29 14:55:08

    Hi Danielle and Rochelle,

    All is well now… the GD module as well as Imagemagick has been activated on my server which in turn has allowed the captcha to work.

    You’d think this would have been already set up seeing as I am using a virtual private server, but nooooo. Oh well, I appreciate your help, guys and gals.

    All the best,
    Chris

    Christopher Jays last blog post..Social networking in Thailand

     
    Comment by Rochelle
    2008-05-29 15:07:16

    Chris,

    I’m so glad to hear this is working for you. It would have never occurred to me to check with my server if I had similar problems. Thank you for sharing what resolved this for you.

    Rochelle

     
    Comment by Alberto Rouiller Subscribed to comments via email
    2008-05-30 11:12:09

    Hi Rochelle,
    Just wanted to drop a note of praise for you sharing this great MOD!

    I just finished installing the “Contact Us” form in my niche site (www.minimotos.eu), and it works perfectly!

    Thanks,
    Alberto

     
    Comment by Holly Ng Subscribed to comments via email
    2008-05-31 02:44:44

    Hi Rochelle,
    Just wanted to thank you so much for your excellent mods and instructions! I’ve incorporated quite a few of them into my site with no problems. You’re terrific!

    A few weeks ago Denise asked how to put the Contact Us form in the footer. I think I’ve found a way to do it and so far I’ve not run into resulting problems. (Please excuse if you’ve already found a mod for this!) First, I followed all of your instructions for the Contact Us form. Then, to put the form in the footer I went to the Copyright block of code in footer.php and added: Contact Us. At this point the contact form works from both the footer and Site Navigation. I decided I only wanted the form to appear in the footer, so I went back to FrontControl.php and deleted “Contact Us” from your code (contactus01.htm) that I previously copied. This seems to work fine, but I’m no techie, so please let me know if you see potential problems with this method. Thanks again!
    Holly

     
    Comment by Holly Subscribed to comments via email
    2008-05-31 03:04:04

    oops, sorry, ’bout that…

    …in the Copyright block of code in footer.php I added:

    Contact Us

     
    Comment by Holly Subscribed to comments via email
    2008-05-31 03:53:32

    Holy cow…can’t get this piece of code to translate correctly. I’ll email it to you Rochelle. My apologies!

     
    Comment by Denise Subscribed to comments via email
    2008-06-02 05:51:29

    Hi Rochelle

    If you get the time, I’d be really interested to know if Holly’s solution works, without unforeseen problems? It seems to work perfectly on her site.

    Hi Holly

    I love the way you have segmented the information on your site with the addition of headings in the right-hand sidebar. If you don’t mind sharing, how did you do this?

    With grateful thanks to you both.

    Denise

     
    Comment by Holly Subscribed to comments via email
    2008-06-02 11:10:45

    Hi Denise

    Credit for this mod goes to Shane! I found an old post where he described how to add headers to header.php for the left sidebar. I applied this to my footer.php for the right sidebar. Here’s the link to his post as he explains so nicely…

    http://buildanichestore.com/me.....er+sidebar

    I just repeated this for as many headers as I wanted and stuck in some for spacing. Just an fyi, my first header, “site stuff,” is actually Site Navigation that I moved from the left sidebar.

    Good luck with your site!

    Holly

     
    Comment by Denise Subscribed to comments via email
    2008-06-02 18:18:36

    Hi Holly

    Thank you for the information and for going to the trouble of finding Shane’s post. I look forward to trying this out.

    Thanks again.

    Denise

     
    Comment by Mistermickster
    2008-06-03 05:17:42

    Hi Denise

    Holly’s solution for the contact us form moving to the footer is spot on. It’s just the moving of a link.

    In fact if she hadn’t already suggested it, I was going to.

    Cheers

    Mick

     
    Comment by Denise Subscribed to comments via email
    2008-06-03 06:39:22

    Hi Mick

    I see from Rochelle’s post that this is your MOD - fantastic, thank you!

    I have followed Holly’s instructions and had no problem putting the link in the footer. However, when I delete “Contact Us” from the code in FrontControl.php, it distorts my side bar heading. See Fender Guitars here. Can you suggest the solution?

    Thanks.

    Denise