Secure and Accessible Contact Form v3

Posted January 1st, 2008 by Mike Cherim

GBCF-vs Demo Site) I’m happy to announce the availability of version three of my GBCF-v3 Secure and Accessible Contact Form. It offers a ton of improvements over version two in the areas of perfected error management, easy language adaptability, passive set-up validation assistance — so the script can be tested before putting it on your site — security, usability, powerful flexibility, and enhanced accessibility. On this last front two notable features include: the form’s ability to automatically adapt to the user’s preferences maintaining the semantics and accessibility and; the form’s refined usage of labels and legends to make the experience of using the form a smart one for screen reader users.

In addition to all of the enhancements, I addressed all of the concerns surrounding version 2. I mean all of them. This form version really is quite a step up from the last one. I hope you’ll be wow’d. Do check out the pages where a lot more info can be found. The demo site index is a special page I put up for the demo only, but the script validation page, form help page, and form test page are actually included with the download. They aren’t meant to be kept on the server, but they offer a good resource for users installing it. The is one deep script, done right… I hope you agree.

Before I open the floor to comments and support questions not yet answered, I am requesting some help in the form of language translators to work on the language files that come with the form. You will be credited accordingly (note the language files already done). I’m also open to having people contribute some theme style sheets, (images are accommodated). Want to help?

Stats: Since its initial release on December 30th, 2007, GBCF-v3 has been downloaded 109007 times.

Attention: There is a new post for form support. Please use it to post your comments, questions or suggestions. Please, however, review the comments herein first to see if your question or concern has been addressed already. Thank you.


354 Responses to: “Secure and Accessible Contact Form v3”

  1. David Zemens - 1955 Design responds:
    Posted: January 1st, 2008 at 8:45 am

    I thought you had been awfully quiet lately. Now I know one of the reasons why. I can hardly wait to check out the new form, Mike. Thanks for all the work.

    HAPPY NEW YEAR!

  2. Gill responds:
    Posted: January 1st, 2008 at 9:19 am

    I’ve been playing with it as requested and it’s looking good so far but it’s slow going due to my ISP crawling under the weight of everyone being off work/school. I’ll get back to you as soon as I’ve been able to really hammer it.

    Nice New Year’s present though!

  3. Dan Schulz responds:
    Posted: January 1st, 2008 at 3:18 pm

    Thanks for the update, Mike. Any idea when the WordPress plugin version will be available, assuming you are keeping up development of that as well?

  4. Gill responds:
    Posted: January 1st, 2008 at 6:59 pm

    Whoo Hoo! Well done that man.

    Very easy install, worked first go. Found one typo and a line in the instruction text file that might need to be a bit clearer for some of your less experienced customers, I’ll ship details through as soon as I’ve finished testing.

    I can rattle off a couple of themes for it this week before I hit the client sites again.
    Translations for German and Spanish should be with you by Friday.
    Do you need Australian? ;-)

  5. Dan Schulz responds:
    Posted: January 1st, 2008 at 9:31 pm

    No problem, Mike. I’ll keep an eye out for it. :)

  6. Longhair responds:
    Posted: January 2nd, 2008 at 4:45 pm

    Is there a way to have random questions instead of just one?

    What about adding something like Image Magic in place of the question?

    Many thanks for making this script for us computer illiterate people :)

  7. Sri responds:
    Posted: January 2nd, 2008 at 11:08 pm

    Is there a “en-au” and “en-ca” to use?

    There is in fact an “en-ca” for Canadian English, I haven’t gone through and looked at your form in detail, but in the written form Canadian English tends to lie somewhere between British and US dialects (ie. British spelling, but American vocabulary… “colour” instead of “color”, but “truck” instead of “lorry”). Confused yet?

    Though in reality, us Canadians are accustomed to seeing everything in US english… so we won’t be wondering “what’s a ZIP code?” since everyone here knows that’s just American for “postal code”.
    Note: if the form handler validates postal codes for format, remember that Canadian codes are different from the US versions, on the other hand, phone numbers are formatted the same.

  8. Jermayn Parker responds:
    Posted: January 3rd, 2008 at 1:01 am

    “en-uk” should be ok for us Aussie readers, as the main problem is the ’s’ instead of ‘z’ (organisation) and ‘our’ instead of ‘or’ (colour).

  9. Longhair responds:
    Posted: January 3rd, 2008 at 4:41 am

    Thanks for the fast response :)

    I remember setting up message boards in the past and the best way to explain what I mean by “Image Magik” is to visit http://forums.ikonforums.com/index.cgi?act=Reg;CODE=01;COPPA=false and find Secure Registration Key. At the right of it, there will be a box with random numbers that is in a picture form that cannot be copied and every time you refresh the page, it will change.

    (Go ahead and delete the above link because that is the best example that I could find and I don’t want people thinking that I am plugging anything.)

  10. Gill responds:
    Posted: January 3rd, 2008 at 6:23 am

    @Longhair - I can assure you there is no need to have a Captcha on Mike’s form. I’ve been using version 1 and 2 for some considerable time now on both my site and client sites, and unlike the the old forms I used that did have Captchas, Mike’s has never delivered so much as a single spammy mail. The traps are done in other ways and seem very effective.

  11. Longhair responds:
    Posted: January 3rd, 2008 at 7:45 am

    Mike & Gill, thanks for explaining that up for me. I play around with web design once in a great while, and the way things move it is hard to keep up with everything for a person like myself.

    Speaking of hard to keep up…

    On my main computer (read - comfortable) it is using Win 2000 Pro which means that I am stuck at IE6. On my laptop, I have IE7 and Netscape/Modzilla/Firefox/What-Ever-It-Is-Called for testing purposes. With both of the IE versions, the contact page starts at the left side, while in the “other” browser, it is centered just like on the test-form on this site (which I am viewing with IE6).

    Another - for the lack of a better word - flaw is that the “Privacy Policy - Blocked: 59 - Script by Mike Cherim” is having the bottom border cutting making it look like a line-through on both IE versions, but not on the “other” browser. Yet again, on the test-form on this site there is no problems.

    I didn’t change anything except for some text colors in the default css - so that rules out operator error.

    One other thing that I would like to change is the alignment of “Contact Form” “Optional” & “Required” so instead of it being lined up at the left, it is in the center. How would I be able to do that? I know it a change in the css, but it would take me about a week to find it :o

    Thanks again for everything

  12. Longhair responds:
    Posted: January 3rd, 2008 at 1:48 pm

    Mike, I figured out the problem with IE… I needed to make the pages in PHP & XHTML complient.

    Now I just need to find a good tutorial on building a basic website in php :(

  13. Web Standards, Accessibility and Other Stuff » Blog Archive » Recommended Web Standards/Development Articles responds:
    Posted: January 4th, 2008 at 12:27 am

    […] Secure and Accessible Contact Form v3 - from Mike Cherim’s Beast-Blog, a great standards-friendly and accessible contact form (using PHP). […]

  14. Sri responds:
    Posted: January 4th, 2008 at 12:07 pm

    Speaking of CAPTCHAs, or a plain-text challenge & response like Mike is using, I don’t think either is really required. I’ve actually stopped using those techniques in favour of one which is both transparent to the user, and (in my personal experience) has been just as effective at controlling comment/contact form spam.

    It’s really simple too: when processing a posted form I just check the HTTP_REFERER value, if it’s equal to the URL of the page that the form is supposed to be posted from (ie. MY page) then the form is handled normally, otherwise I ignore the submitted data and just display the blank form.

    (you could also use HTTP_HOST or SERVER_NAME if you don’t want to be so narrow as to restrict submissions to only a single page on your site - ie. if you’re going to have multiple contact forms on your site all posting to the same form handler)

    That way, if someone were to copy my page to their desktop & submit from there, it would be ignored. As a result, remote scripts trying to post to my page will not work. However, if somebody scripted an actual browser to navigate to the form page to fill & submit it, that would still work. I’m thinking that not too many people do that (too hard).

    As an added precaution, when a form is posted successfully I set a “timeout” cookie which disables the form for 1 minute for that user session - this is to prevent someone from manually spamming me by going through a submit/back-button/re-sumbit cycle. It’s not 100% effective to be sure (disabling cookies bypasses it) but it clears the low-hanging fruit as the inconvenience will block most mischief-makers.

    I don’t think that these measures inhibit accessibility - if anyone hear sees how it might, I’d be interested in finding out how (and making the needed corrections), especially since I had used this technique with the intent to INCREASE accessibility by giving users less to do, and by avoiding too-hard-to-read CAPTCHAs.

  15. SleeplessinDC responds:
    Posted: January 5th, 2008 at 11:26 am

    In the README.txt file, the first step says to “Upzip and check out the readme file”. The second step in the Installation says “Open that file…”. What file is that file?

  16. paul responds:
    Posted: January 7th, 2008 at 5:19 pm

    oooh, just stumbled across this. i will have to give it a look over. can’t wait for the yummy WP version!

  17. Gill responds:
    Posted: January 9th, 2008 at 11:44 am

    Spanish has just been sent.

  18. Swim Man responds:
    Posted: January 9th, 2008 at 1:55 pm

    Awsome script. It was easy to install even for a noob to web programing such as myself. I had a bit of trouble trying to get it to work in my html, but after rereading the FAQ a few times, I finnally grasped my problem which was easly correted. Kudos Mike.

  19. stuart responds:
    Posted: January 9th, 2008 at 8:01 pm

    Hi.
    The form is very good.
    I receive the following problem when I try to add a ‘thank you’ page.
    I’m a novice, currently studying web programming. I’m still picking up the ‘tech talk’ so your advice in clear english would be appreciated .
    Thanks.

    Warning: Cannot modify header information - headers already sent by
    > (output started at
    > /home/user/card.co.uk/inc/header.inc:5) in
    > /home/user/card.co.uk/gbcf-v3/files/functions.php
    > on line 1141

    The code below makes up my pages.

  20. chris responds:
    Posted: January 10th, 2008 at 2:50 am

    hi mike. i really appreciate your time working on this contact form.

    I’ve installed it on a site and everything looks, works fine.

    except… no email is sent. obviously i have modded the config file to include the email.

    i set the $smtp_sneak and $ini_set to “yes” but no avail.

    I’m planning on donating but I’d love some help in the mean time.

    have mercy?

    thanks again,
    chris

  21. chris responds:
    Posted: January 10th, 2008 at 2:52 am

    my apologies. the page where i have installed the contact form is:

    http://www.rocksteadyinc.com/index-4.php

    best,
    chris

  22. chris responds:
    Posted: January 10th, 2008 at 2:40 pm

    Hi Mike. That was it! I got in touch with Yahoo (hosting) and filled in the smtp and port info. Now everything works great. Thank you so much. I have enough knowledge to be dangerous but not always enough to fix things.

    All the best,
    Chris

  23. Monika@The Writers Manifesto responds:
    Posted: January 16th, 2008 at 11:04 am

    Hi Mike,

    I’m desperate for a WP contact form that runs on the latest WP version. Since updating two of my blogs to the latest version I cannot upload any plugins anymore. They show in the FTP in the plugin directory of my blog, but when I go to my blogs admin and try to activate they are non existent.

    Is this form compatible as is for WP, if I follow your “read me” directions, or do I have to wait for your Plugin version to be released?

    Monika

  24. Michael responds:
    Posted: January 16th, 2008 at 1:03 pm

    Mike - I’ve been using a cgi formmailer for years, but just moved my site to a new host and can’t seem to get it to work. I’ve been checking out php form mailers and yours looks great. The installation was easy, and worked the first time (a blessing after some of the issues I’ve had recently). I’m looking forward to checking out the WP version for my blog as well.

    I just have one issue - I don’t seem to be getting a copy sent to the sender when the “check for email copy” box is checked.

    And a few questions. My previous form had a few custom fields, like arrival and departure date, and a few otther details pertinent to my business and the info I’m seeking from customers. I also had a few radio buttons. I haven’t found any info in the faq regarding adding additional fields (other than changing the labels of some optional fields in the language file). Am I missing it, or do I need to make custom changes to the script if I want to add these things, or change the order of the fields? Most likely I can get most of what I need by changing some field labels, but your script is so comprehensive I was just wondering if I’ve missed some options somewhere.

    Thanks.

  25. Michael responds:
    Posted: January 16th, 2008 at 1:57 pm

    Thanks for the quick response Mike. For now I’ll drop the cc option and just edit a couple labels and styles. I can always make a copy and play around with more complex edits on that later. Thanks again. Great script.

  26. Sammy responds:
    Posted: January 16th, 2008 at 7:21 pm

    Hi Mike,

    Is it possible to turn off the MESSAGE textarea (in Config.php or somewhere else) ? I’m making a simple form with just a name and an email, to subscribe to an email list, and I don’t need the textarea.

    Thanks.

  27. Monika@The Writers Manifesto responds:
    Posted: January 16th, 2008 at 8:46 pm

    Hi Monika, this script isn’t yet a WP plugin, but you should be able to use the contact form plugin currently available. It works in the latest version. Regarding your other issue, check the permission of your plugin folder. It should be 755. If it’s less than that you wouldn’t probably experience what’s going on at your end.

    Hi Mike,

    I did all you said, checked my CHMOD and they are both 755 in both blogs. I then downloaded your recommended plugin, unzipped it and uploaded it into the plugin folder on my server.

    I go to the admin - plugins (trying to activate) and all there is is nothing - nadda!

    What next? I’m getting really desperate and everywhere I turn, nobody knows the answer.

    Monika

  28. Sammy responds:
    Posted: January 17th, 2008 at 8:13 am

    Hi. I’ve followed your advice for hiding the textarea. Commenting it out didn’t work, as the default content that I added wasn’t even submitted, so I got an error. So instead I used css (position absolute) to hide it (and its label) from view, like the honeypot. That way it’s invisible, but still gets submitted. Works fine.

    I also added tabindex=999 to that hidden textarea, so that tabbing just goes from one visible field to the next. And I added tabindex=1000 to the honeypot, to be able to tab straight from the last visible field to the submit button. Maybe that last bit could be an idea for improvement of your script ?

    Thanks for your work.

  29. Tim responds:
    Posted: January 20th, 2008 at 7:02 pm

    I was thinking, is it possible to adapt this to a questionnaire form, so that you can have custom questions. I’m thinking in terms of a client questionnaire for a web design business maybe 20 questions or less.

    I’m guessing form.php is where i’de need to start but where else would need to be edited to create custom input fields with textareas?

  30. dbj responds:
    Posted: January 24th, 2008 at 7:05 am

    as always an excellent item.

    not quite sure what i would do without this superb contact form.

    a big thankyou from all the members of my two sites who easily use this form to repart problems :-)

  31. Mel Pedley responds:
    Posted: January 25th, 2008 at 11:58 am

    I’ve just had a very similar problem to Stuart’s. In my case, I couldn’t get the form to display my customised thank you page. It persisted in using the default message and re-displaying the form. Like Stuart, the site that I’m using to try out this new version of the form has its own header files etc. As soon as I saw the header() call in the functions file, I figured this might be the cause as header() must be called before any actual output is sent. Both Stuart’s pages and mine have already sent output via included headers so a call to header() will either generate an error or cause the url call to silently fail.

    The solution? Add ob_start(); to the very top of any PHP page being used to call the form and ob_end_flush();. That will buffer the output and allow the header() call. At least that’s worked for me.

    Incidentally, in the documentation, you describe the $thankyou_url as being “relative”. But relative to what? eventually, I figured out it was relative to the site’s root directory but you might want to clarify that.

  32. Mel Pedley responds:
    Posted: January 25th, 2008 at 12:03 pm

    Sorry - edit:

    Add ob_start(); to the very top of any PHP page being used to call the form and ob_end_flush(); to the very end of the page.

  33. Mel Pedley responds:
    Posted: January 25th, 2008 at 1:05 pm

    I’ve just been doing some more testing on the live site and ob_start() isn’t the answer. I ended up being re-directed to the thank you page after trying to submit an empty form! So much for output buffering. :-(

    I’m not concerned about the fact that I’m not getting a PHP error. Recently, I’ve been tending to turn error reporting off via script or .htaccess on Apache unless I’m actively debugging something. And the script does work just fine - except it refuses to show my thank you page. I’m just frustrated that I can’t find a way around this when I’m willing to wager that it’s a header issue. Would an include be an option instead of a header call (though that would mean supplying header and footer files for sites that don’t have these files as standard)?

    I’m also going to see if I can find a way of including the form before my header files which would circumvent the problem.

    With regard to the help documentation, I did read both help files but still felt a little unsure about the correct relative path to use. Perhaps it’s just me? When I write up script documentation, I always try to be specific and tend to say “relative to your site’s root directory” or “relative to this file”. If there’s one place people do seem to routinely have problems, it’s in regard to file paths.

  34. Longhair responds:
    Posted: January 28th, 2008 at 10:20 am

    I was wondering if there is a simple way to have people enter their own subject instead of using the drop down menu?

    Thanks again for everything

  35. Barry Hurford responds:
    Posted: January 28th, 2008 at 4:33 pm

    As a fairly traditional ‘ladies man’ - It’s not often that I shout out loud “I LOVE YOU MIKE!” but that is exactly what happened today, 10 minutes after I installed this beauty!

    This contact form is extremely well thought out and executed. It is clean, secure and readily configured using the CSS theme and CONFIG file.

    If you are here in search of a professional PHP contact form then rest a while my friend for you need wander no more…

    Incidentally, I clicked the DONATE button earlier and there was a definite feeling of good karma about it - I would like to suggest that those of you who find Mike’s work useful click on the DONATE button too - it is life enhancing!

    Thanks Mike - your gift of well formed coding is well received :O)

  36. Andy responds:
    Posted: January 30th, 2008 at 6:56 am

    Thanks Mike, another great piece of work. A few additional text fields and option menus (optional) would hugely increase the opportunities for deployment. Removal of tag means page now validates! I’m hoping to be able to send you a Welsh translation soon.

  37. Cody responds:
    Posted: February 3rd, 2008 at 4:40 pm

    First off….this is by far the most complete and well built php form i’ve found online. The one thing i notice is that in Safari if the user doesn’t fill out the form right they are brought to the “error” page. On that page is says to use the “back” button to go back to the form to fill out all the required fields. I’m using Safari 3.0.4 and when you click the back button it doesn’t go back to the form page…..it just stays on the “error” page. Any thoughts?

  38. Cody Silva responds:
    Posted: February 3rd, 2008 at 7:06 pm

    Hmm….weird. I tried it again in Safari 3.0.4 and if i don’t fill out anything on the form and hit “submit” i get to the page stating…”Results: Error Made!

    Required Field(s) Missed: The following “Required” fields were not filled in. Using your “Back” button, please go back and fill in all required fields.

    Empty Field(s):
    “Enter your full name”
    “Enter your email address”
    “Select a contact reason”
    “Enter your message”
    “Enter 6315”

    …there is nothing else on the page (no form below this content). When i hit the browser back button it stays on this “Results: Error Made!” page but the url reflects the PHP contact form path. I also tried this with the contact form on your site and it does the same thing in Safari. It works fine in Firefox. Oh and this is all on a Mac.

  39. Cody Silva responds:
    Posted: February 3rd, 2008 at 7:36 pm

    I think i had version 2 of the form…..I just downloaded v.3 and will try that.

  40. Steve Butler responds:
    Posted: February 4th, 2008 at 2:24 pm

    Mike,

    Looking like the best contact form I’ve found so far :-)

    Have not yet found anything that does not work as stated, one thing I’d like to be able to do, but I have no php experience is to have default message text matched to the subject selection i.e. 4 subject options with corresponding 4 default message text entries.

    For me, this would move it from Brilliant to Stunning!

    Steve

  41. Steve Butler responds:
    Posted: February 4th, 2008 at 2:32 pm

    Donation on its way!
    How do I make the subject drop down list form field display box longer? it does not show all the text in IE7?

  42. Steve Butler responds:
    Posted: February 4th, 2008 at 4:13 pm

    Doh! found the select - having a blind moment.

    On the message text, it would be nice if it could be done using the config file and another array, but having never done any php… might give it a go if I have a free week soon :-)

    Cheers

  43. Stephen Anderson responds:
    Posted: February 5th, 2008 at 1:44 am

    Hi Mike,

    Firstly thanks for this plugin. I am definitely a novice when it comes to this stuff. I managed to change the config file and then upload the file and test it. It all works fine it seems.

    I have three different blogs. I uploaded the GBCF-v3 folder to my public_html directory. I am wondering if that was the right place to put it? If so, how do I get it to work on my desired blog. Do I need to now move it to the wp-cotnent ==>Plugins directory ?

    I hope it is not too simple a question :)

    Thanks,
    Steve.

  44. Alex responds:
    Posted: February 9th, 2008 at 1:02 pm

    Hello Mike, thanks for the great script…

    I first set it up locally but when I set it up on the server this is what I get http://www.awholeuniverse.com/index.php/contact

    I have looked through the functions file and the config file and everything is as it should be.

    Thanks a lot for your help!

  45. Isaac Rowntree responds:
    Posted: February 10th, 2008 at 4:17 am

    Hi Mike,

    First off, I really liked your Contact Form v2. So much in fact, that I released an e-commerce plugin for Wordpress that included a way to tie in to your Contact Form for sending off orders.

    http://wordpress.org/extend/plugins/quick-shop/

    This would have increased your download margin significantly, I bet.

    However, I have since come up against a bit of a brick wall. I want to support 3rd party payments like Paypal in Quickshop while still being able to use a form so that customers can get a receipt and shop owners can be notified.

    This is where your v3 form would be really good. Since you are actively developing it we could possibly collaborate and make it so that they were still seperate plugins, yet could hook into each other extremely easily.

    I’m a little unsure how that would work, but it’s certainly something to consider. At the moment I’ve been trying t o add a contact form to my plugin and in my view it’s both messy and unnecessary. If your v3 plugin supported adding extra fields easily via an admin interface much like CForms II, allowed the sending of a receipt in some way, and output the contents of the shopping cart easily into the main text body, it would be awesome. I believe there should be any easy-enough way to do this via a kind of API so that down the track other developers could hook in also.

    At the moment I use PHP sessions to store form data… this may need to be changed or finalised.

    Eagerly awaiting your response,
    Isaac

  46. Alex responds:
    Posted: February 10th, 2008 at 4:38 am

    Hey Mike…. I switched to “Secure and Accessible PHP Contact Form v.2.0WP” however I know that until this point there is no possibility of excluding some fields from the form(like let’s say telephone or reason).Do you have any updates on that? I tried to change the php file but even though I exclude the fields the script checks for the fields excluded and I get an error message. Do you know any workaround?

    Thank you!

  47. Alex responds:
    Posted: February 10th, 2008 at 6:25 am

    There seems to be another error

    “It looks like you’re trying to post remotely or you have blocked referrers on your user agent or browser. Using your “Back” button, please go back and try again or use my regular email, [email removed], to circumvent Referrer Mismatch.”

    Do you know what might have caused this?

  48. Alex responds:
    Posted: February 10th, 2008 at 12:55 pm

    THANK YOU … it worked !!!!

  49. Adam responds:
    Posted: February 10th, 2008 at 10:49 pm

    I just installed V3 of the script on my website. Script works great, and was a million times better then the 3 field contact us form I had created last year.

  50. Leonard responds:
    Posted: February 17th, 2008 at 12:43 pm

    What a great script! I needed it to be able to send to different folks, depending on the link, so in CONFIG.php I replaced

    $send_email = "foo@foobar.com";

    with

    $send_email=$_GET["to"];
        switch ($send_email){
    case "Foo":
        $send_email = "foo@foobar.com";
    	break;
    case "Foo2":
        $send_email = "foo2@foobar.com";
    	break;
     default:
    	header("location:mail_error.php");
    	break;
    	}
    

    So now at URL of mail.php?to=Foo works.

    I don’t know much about security, though — have I compromised anything with this?

  51. Susan responds:
    Posted: February 18th, 2008 at 6:59 am

    Hello Mike,
    Thanks a lot for that great contact form!
    I was able to succesfully install it. And the testform is working good and I recieve the email, but I am so new to php that I cant figure out how to do step 9 in the installation process:
    “Add the link to the style sheet and the focus JavaScript file - for form field focus effects for Internet Explorer - to the head of your contact form page (see Figure 1), then add the PHP “include” to the body content area of that same page (see Figure 2). Go live and worry not.”

    Do I have to make a php page contact.php and put the php include code in as only content? When I try so, I get an error:
    ———
    Warning: main(gbcf-v3/form.php) [function.main]: failed to open stream: No such file or directory in /home/.sites/106/site123/web/testing/gbcf-v3/contact.php on line 2

    Warning: main() [function.include]: Failed opening ‘gbcf-v3/form.php’ for inclusion (include_path=’.:/usr/lib/php/’) in /home/.sites/106/site123/web/testing/gbcf-v3/contact.php on line 2
    ————
    As I said, I am new to php and appreciate any help very much!

  52. Jen Rohrig responds:
    Posted: February 19th, 2008 at 9:42 am

    I just added the form to my Accessible Design site - it’s really cool. I think what I like most about it is the form code is all nicely contained in one area and all I needed to do was add a few links to it. PHP programming is my weak area - something I’m trying to fix but it’s slow going. Just not a programmer at heart.

  53. laura responds:
    Posted: February 28th, 2008 at 4:02 pm

    Hi Mike

    Thanks very much for your script, it’s great one!!

    I was setting up the contact form on a horizontal page, using horizontal tiny scroll javascript from Marco Rosella -http://www.thehorizontalway.com- but when I click to the submit button all the page is moving to the left side…. I was trying to find the function to fix that in the fuctions.php file and in the other files but I couldn’t find it, I have been stuck with problem for a while …. could you help me?

    One more thing, I noticed that the spanish language file is writting in LatinAmerica Spanish and very formal way, different to the spanish we talk on Spain, so I don’t mind to send you a file with an extra version for spanish on spain (castellano), just only few words are different.

    Thanks ;)

  54. laura responds:
    Posted: February 28th, 2008 at 7:18 pm

    Mike

    thanks for your answer… yes, horizontal :) … I was trying with the #results… but I didn’t manage to make it work.. it’s still jumping…
    http://www.pablogoikoetxea.com/main.php#fourth

    Regarding the Spanish file, yes, I rename the new one as es-sp (español-spain).. ?!
    just let me know how it will be the best way to send to you, through a link from my server or by email

    thanks :)

  55. laura responds:
    Posted: March 1st, 2008 at 11:08 am

    Hi Mike

    Thanks for the testing. I though I upload the last functions.php and form.php files…. I will do again :)
    I was using negative margins before and It didn’t work, I will trying again..

    Sorry for the delay to send you the “es-sp” file, just waiting for my friend send me your email… as that contact form is going to my friend email - I set up that contact form for him, Pablo Goikoetxea’s website-. As soon as I get your email I will send to you the file.
    About if the other “es” file should have something added to, I think it will fine just as “es”, as the other one will be name “es-sp” that it will make a specifications about this spanish version, the other one, even it’s more latinamerican spanish, it’s fine named as it was.

    Thanks for your help

  56. Mark responds:
    Posted: March 17th, 2008 at 12:25 pm

    Getting an error like below:

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../../gbcf-v3/files/CONFIG.php) is not within the allowed path(s)

    Is there a way to get this working when a host has safe mode on like shown above? (I know, it’s a hosting problem with their configuration but as this is shared hosting not likely they will change things.)

  57. dean responds:
    Posted: March 19th, 2008 at 11:20 am

    Hi Mike- Great form here. I was trying to install the script on my site here; http://apatalk.com/rates.php, but I get two error messages. Any help from your busy schedule would be appreciated.

    Regards,
    Dean

    Warning: main(gbst/form.php) [function.main]: failed to open stream: No such file or directory in /home/apatalk/public_html/rates.php on line 25

    Warning: main() [function.include]: Failed opening ‘gbst/form.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /home/apatalk/public_html/rates.php on line 25

  58. dean responds:
    Posted: March 19th, 2008 at 12:44 pm

    Mike- I’m not sure what I did, but apparently it works now. I’m still using the same line of code that is found in your readme.txt file. It says to include this line of code into the body of the page;

    The only thing that I tried was inserting this into the head part of my page and then back into the body area and now it works. Strange. Not sure if you know why? Helpful to know for future reference. Thanks again.

  59. dean responds:
    Posted: March 19th, 2008 at 12:45 pm

    Oops, the comment box doesn’t allow for php code. Let me try it this way;

    //

  60. dean responds:
    Posted: March 19th, 2008 at 12:46 pm

    Damn. Not sure how to include php code into this comment form. Well, hopefully, you might know what I’m referring to. If not, just email me.

  61. Gill responds:
    Posted: March 22nd, 2008 at 8:49 am

    With regard to Stuart’s problem

    Warning: Cannot modify header information - headers already sent by

    This can sometimes be caused by spaces at the beginning or end of the PHP file. It can also be the result of using an editor which attaches a Byte Order Mark (BOM). The UTF-8 representation of the BOM is the byte sequence EF BB BF, which appears as the ISO-8859-1 characters “” in most text editors and web browsers not prepared to handle UTF-8.

    When I see that warning, the first thing I do is open the file up in a text editor which recognises Hex characters, I use UltaEdit, and make sure there are no odd characters on the front of the code, no spaces on the front of the code, no spaces or blank lines at the end of the code. If there are, remove them.

    I then save as UTF-8 No BOM. Nine times out of 10 that fixes the problem.

    A lot of people try to edit the files in FrontPage, Expression Web, CoffeeCup or other non-pro packages. That’s when you get the BOM added. MS have admitted they crippled EW with regards to PHP but I’m told version 2 will handle it.

  62. Tim responds:
    Posted: March 22nd, 2008 at 1:42 pm

    Great work, Mike! I’ve used your WordPress plugin for some time now, and it works great! Now, to my problem :(

    I loaded up this new version of the contact form for my non-WP site (the URL provided), and everything was fine. Suddenly, the PHP function scandir() stopped working on my site! Zoiks! I perused the previous comments, but didn’t see anything that looked like it would fix my problem. I’m no PHP guru, so maybe I’m missing something.

    The error is:

    Fatal error: Call to undefined function: scandir() in /home/content/t/i/m/timjamz/html/storytribe/just4fun/1.php on line 4

    I’m using scandir to check the contents of the directory for the number of files present (for dynamic navigation of the webpage)… I don’t want to use readdir, since it modifies the “accessed” time of the files. For example:

    $nextcomic = ($comicid + "1");
    $prevcomic = ($comicid - "1");
    $dirarray = scandir("just4fun/");
    $dirarraynumber = count($dirarray);
    $lastcomic = ($dirarraynumber - "2");

    The contact form scripts don’t modify any globals, do they??? I contacted my web host, and they insist they haven’t changed anything. It was working fine yesterday and this morning before using the contact form. Thanks for any help/guidance you can provide!

  63. Tim responds:
    Posted: March 22nd, 2008 at 3:11 pm

    Mike, thanks for the quick response! I’m not sure if the contact form had anything to do with this or not (again, I am no PHP guru). Maybe it’s just a coincidence that this happened at the same time as installing the contact form.

    However, this may help someone else someday.

    For some reason, *.php files on my host (GoDaddy… I know, I know…) were suddenly not associated with PHP5 processing anymore (aka reverted to PHP4 as default). I had to add the following lines to my .htaccess file for *.php to go back to PHP5 default processing:

    AddHandler x-httpd-php5 .php .php5
    AddHandler x-httpd-php .php4

    Anyway, all is well after doing this…. and the contact form works great!

  64. Tim responds:
    Posted: March 22nd, 2008 at 4:39 pm

    Indeed, the form worked flawlessly. My pages were what failed… just wanted to clarify that. Maybe something in the form notified my host’s servers that my files weren’t being processed in v5 native…. or it may have been some big whopping coincidence. Again, thank you!

  65. Gill responds:
    Posted: March 23rd, 2008 at 8:41 am

    Tim, suspect Godaddy. I’ve had 3 different hosts make some changes to PHP over the past 3 months, on 7 different servers and each one has got it wrong. Apart from 4 client sites where the includes just vanished, all the others were showing completely different problems and had me climbing the walls.

  66. Gill responds:
    Posted: March 24th, 2008 at 10:08 am

    I’m in the process of helping someone who is trying to install this form and they’re having all sorts of problems. It’s not the fault of Mike or the form but something I thought I should raise here. Mike, you might like to add something about it to your install info.

    You cannot edit the files or upload them using FrontPage or Expression Web Version 1. I suspect you may also get problems if you’re using Blue Voda, CoffeeCup and various other WYSIWYG editors. These bits of kit are meant for making quick web pages with HTML not PHP.

    If you normally use these tools I suggest before you start with this form you download UltraEdit which is free and will allow you to modify without corrupting.

    You will need to upload using an FTP client such as Filezilla not (PLEASE NOT) FrontPage Publish. However, if you normally use FrontPage and have the FSPE (FrontPage Server Extensions) active on your hosting account, FTP will corrupt them. You have two choices.

    If your host gives you control over FPSE then you can upload with an FTP client, then reinstall your FPSE
    or if that isn’t an option,
    log onto your host control panel and use their File Manager to upload which should not corrupt anything.

  67. Gill responds:
    Posted: March 24th, 2008 at 12:43 pm

    Problem is Mike, to many non-pros, FrontPage code view is a plain text editor. They open it, they get text, not pictures. You may need to spell it out.

  68. Gill responds:
    Posted: March 24th, 2008 at 12:50 pm

    (FPSE) can also wreak havoc on the files. This can turned off for a minute or upload can be done through the server. Even good FTP programs like Filezilla and CuteFTP can fall victim to FPSE.

    Other way round. Using FTP to upload corrupts the FPSEs. It won’t affect your form or any PHP stuff loaded but the site, if it uses FrontPage bots such as Gallery, will fail spectacularly

  69. Gill responds:
    Posted: March 24th, 2008 at 1:18 pm

    :-)

    JBVisions - reasonable rates - sympathetic ear - great with Mike Forms. LOL!

  70. Dogs and things responds:
    Posted: March 25th, 2008 at 3:16 pm

    Hi Mike,

    I just drop by to let you know that I´m impressed by your latest version. I was using v2 on one site but when trying to install it on my main site I ran into troubles. Fortunately it ocurred to me to check out your site and surprise surprise I found your new version.

    What a huge improvment you have made, brillantly done, it´s so much easier to configure, style and manage.

    As I feel such great work can´t be free I just gave your donate-button a tiny touch.

    Thanks a lot Mike, good luck.

    Greetings from Spain,

    Willy.

  71. Dogs and things responds:
    Posted: March 25th, 2008 at 4:19 pm

    My pleasure Mike.

  72. Carl responds:
    Posted: March 28th, 2008 at 6:23 pm

    Hi there,
    I installed your script today and I am very impressed. It seems to work perfectly, and is very flexible.
    Thanks for all of your hard work. I do have a question and was wondering if you had any thoughts on this application. I have a client with a company directory of names and contact emails. This leads to a huge amount of spam to the employees of the company. Could this form be setup to have a drop down field with the employees name so that the request could be sent to that corresponding email address ?

    As I was playing with it it seemed doable but my php skills are fairly green and probably beyond my capability. It seems that this would be an excellent option to have.

    cheers
    Carl

  73. Carl responds:
    Posted: March 29th, 2008 at 12:48 pm

    Thanks for the reply Mike,

    Count me in on the first person to buy the commercial version with this feature.

    Carl

  74. Paul responds:
    Posted: April 14th, 2008 at 11:12 am

    A quick question - are the emails stored / backed up anywhere by default?

  75. Brian Lokker responds:
    Posted: April 18th, 2008 at 10:27 am

    Mike, I’m trying the v3 of the form and it looks great! I set it up on my local development server using MAMP and it works perfectly. When I upload it to the live server, the validation page runs successfully, but when I try to process the form, I get a “page not found” error. I checked the source code and discovered that the form action path includes an extra directory level. So instead of “/contact/test-form.php#results” as it should be (and as it is on my local development server), it is “/[extra_directory]/contact/test-form.php#results.” I checked with the web host and they confirmed that the site is installed in a subdirectory of the server. So my question is whether it is possible to modify the form so that the start path is “/[extra_directory]” rather than the top-level directory of the server. The web host may agree to move the site if I need them to, but I thought I’d see whether there is a relatively easy fix on the form. Thanks in advance.

  76. Brian Lokker responds:
    Posted: April 18th, 2008 at 12:21 pm

    MIke, thanks for your very prompt response.

    Unfortunately, editing the variable in the form.php and functions.php didn’t do the job. The form action path was still wrong, and other paths were thrown off too (e.g., to the focus.js file).

    You mentioned editing the form action in the CONFIG.php file. Right now it’s blank. What would I change it to so that the extra “top-level” directory is eliminated from the path?

    Brian

  77. Brian Lokker responds:
    Posted: April 18th, 2008 at 1:02 pm

    Thanks again, Mike. I’ll experiment some more.

    I checked the help page but I didn’t think the variable renaming applied because I didn’t actually rename the gbcf-v3 folder - I just placed it within the “contact” directory which I thought (erroneously) was at the root level.

    Anyway, I’ll see what happens.

    Brian

  78. Brian Lokker responds:
    Posted: April 18th, 2008 at 1:56 pm

    Mike,

    I added the pound sign to the form action, and the form submission works as a result. However, that seems to interfere with the page reset function. On balance I think my better course is to get the site moved to a top-level directory.

    Brian

  79. Brian Lokker responds:
    Posted: April 18th, 2008 at 4:15 pm

    Good call, Mike! Before getting the site moved, I tried setting the action to the full URL, and it worked like a charm! Thanks for all your help with this. (Donation on the way.)

    Brian

  80. Mark Fleming responds:
    Posted: April 19th, 2008 at 10:54 am

    Does this record the IP address of the contact form user and send it to me along with the message?

  81. Mark Fleming responds:
    Posted: April 19th, 2008 at 11:25 am

    NIce, thanks.

    One more question: does the email come to me with the “from” address of the user who filled out the form, so I can easily just click “reply” in my email program?

  82. Gerard Bulger responds:
    Posted: May 5th, 2008 at 7:13 am

    very very good indeed. Worked out of the box and thanks and credit of course. Spam has stopped, as I had problems ++++ with my old script.

    The only thing I want to do is change the phrase “check for email copy” at the bottom of the form, as in UK English and the less savvy that needs to be something like
    tick the box to get an email copy for yourself. I cannot find the original line on your script to edit.

    Gerry

  83. Carl responds:
    Posted: May 12th, 2008 at 12:15 pm

    Hi Mike,

    I installed PHP 5.2.5 and Mysql on a Vista Ultimate machine. I have been running your script on my clients site with no problems accept 1( I will ask you about this later) but when running it on the local server I get this error.

    Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not in a.b.c.d form in D:\local_marinelink_ca\gbcf-v3\files\functions.php on line 722

    Warning: mail() [function.mail]: SMTP server response: 502 negative vibes in D:\local_marinelink_ca\gbcf-v3\files\functions.php on line 1132

    But I do get a “Success email sent Results.”(no mail sent though of course)
    I know it is probably the settings I have in the IIS manager or PHP install but was curious if you may have some insight.
    If not I will scour the technotes on IIS7 and PHP.

    regards
    Carl

  84. Shane Mitchell responds:
    Posted: May 15th, 2008 at 6:07 am

    The email address validation doesn’t allow the + character. According to the RFC for email addresses the + character is valid and a lot of people are now using it with GMail when giving out their address to websites.

  85. michael responds:
    Posted: May 22nd, 2008 at 3:49 pm

    hey why don’t you put a line in the config file to switch themes more easily.

  86. Bell responds:
    Posted: May 22nd, 2008 at 10:52 pm

    Help!
    My form will not direct to my thankyou url. My contact.php that calls the form is in the public_html folder, so is my thankyou.html page. But the form reloads itself after submitting. I tried the fix above putting ob_end_flush();. at the very end of the contac.php and ob_start(); at the very top of the page and they showed up as text on the form page. I entered my thankyou_url as /thankyou.html and tried it without the slash and none of this works.
    How can I get this to work?

  87. Bell responds:
    Posted: May 23rd, 2008 at 4:46 pm

    Thanks for your reply I appreciate it.

    I noticed that it works with the test-form.php, Does that offer any clue, or perhaps things I could try. I’m a php newb.

  88. Bell responds:
    Posted: May 23rd, 2008 at 4:50 pm

    … also, I changed the code in my contac.php page in the include line from “form.php” to “test-form.php” it didn’t work and just refreshed the test-form page after submition.
    So the problem has to do with that include line maybe…
    Any thoughts?

  89. Bell responds:
    Posted: May 23rd, 2008 at 7:43 pm

    Hi Mike thanks again,
    my server log says [public_html/gbcf-v3/gbcf-v3/files/focus.js] does not exist. I noticed the repeat of the gbcf-c3 folder. Its the same for [public_html/gbcf-v3/gbcf-v3/files/themes/default.css]

    Would this cause my thankyou page error?

  90. David O'Neill responds:
    Posted: May 24th, 2008 at 7:02 pm

    Mike I would just like to say thank you for all the hard work you put into this script. It is amazing and I thank you for releasing it to the general public.

    I love how easy it is to configure…..LOL the only problem I am having now is actually adding the form to my own xhtml page hahahaha but I will work it out.

    Thanks a million again,
    David O’Neill

  91. David O'Neill responds:
    Posted: May 24th, 2008 at 7:23 pm

    Hi there sorry about this question…..I am just a noob web designer. I am trying to integrate this fantastic form with my own web page which is written in xhtml and css. I was hoping to place the form in a div of its own.

    Is there any chance that somebody could post the code required so I can have it within one of my own pages. I have been hunting this site and the files for the info and I just cannot find it.

    Thanks
    David

  92. Pascal responds:
    Posted: June 11th, 2008 at 5:29 am

    Hi Mike,
    When we want to rename the main folder of your script, you require us to modify the $set_directory variable three times in the functions.php file… What about using the keyword “global” to avoid having to set the variable again inside your functions?

    Instead of

    function list_langs() {
    $set_directory = “gbcf-v3″;
    “,

    you would have

    function list_langs() {
    global $set_directory;

  93. Mike Young responds:
    Posted: June 20th, 2008 at 8:46 am

    Hi Mike and Hi All.

    Mike first up. Great form script and a easy install both locally and server wise. I have a quick question for anyone that might be able to help. On the form itself the first 2 labels are Obligatory.

    I need the Obligatory fieldset to include the telephone number and for it to be a and required input field. Hope I am still making sense. I’m not a whizz like some with php and form validation.

    So I have moved the telephone field/label in to the Obligatory fieldset. The question is how do I now make sure that the field is validated? A live copy can been seen here - www.caminoproperties.co.uk/contact.php

    Any help would be really appreciated.

    Thanks

    Mike

  94. Mike Young responds:
    Posted: June 20th, 2008 at 9:50 am

    Hey Mike. Thanks for the response.

    I have the functions.php file open.. Is it just a case of striping this line out?


    if(isset($_POST['phone'])) {
    $phone_value = clean_var($_POST['phone']);
    }

    Then moving it up to follow on from the code underneath?

    // Required
    $id_value = clean_var($_POST[''.$form_id.'']);
    $name_value = clean_var($_POST['name']);
    $email_value = clean_var($_POST['email']);
    $phone_value = clean_var($_POST['phone']);

    Thoughts? Perhaps I am barking up the wrong tree here. If so I’ll guess I’ll start again.

    Mike :-)

  95. Mike Young responds:
    Posted: June 20th, 2008 at 11:01 am

    Thought so!! I did say that I was not a whizz at this..

    I skimmed through the functions.php file again.

    I did notice the Error Management. Is this the area I should be looking - Line Nº 799 onwards..

    Forms works great apart from my inability to validate the required fields..

  96. Mike Young responds:
    Posted: June 20th, 2008 at 12:27 pm

    Thanks Mike.

    Seem to have the functions.php file sorted. Thanks for that. Quick question?

    When adding field/labels in the form to the Obligatory section, which bit of code am I moving?

    Sorry to be a pain.. You have already been more than helpful..

    Thanks

    Mike

  97. Ben Martin responds:
    Posted: June 22nd, 2008 at 11:05 am

    Great script!

    Very well done, well coded, well documented, quick & easy to install (and, furthermore, it works!), full of useful options and secure as well - thumbs up to the developer (Mike)!

    I’m happy to have found this script, and will definitively remember it…

    -Ben

  98. Sandra responds:
    Posted: June 22nd, 2008 at 2:21 pm

    Hi Mike,
    Fabulous script, many thanks. You mentioned in the changelog the current version as removing the lang attribute in form.php so the main form validates in xhtml 1.1. I’m still getting a validation error, though, and can still see the lang attribute there. Is there a simple way I can edit this out?

  99. Mike responds:
    Posted: June 25th, 2008 at 4:37 am

    Hey Mike

    Thanks for your help last week. I really appreciate it and a donation will be coming your way to say thanks.

    One quick question for you or anyone else out there may be able to help with. when viewing the form within IE7 the field backgrounds are yellow whilst in firefox they are all white as set by me via the css file.

    Does anyone know of any css hack, trick or tip to get those backgrounds to appear white aswell?

    Thanks

    Mike

  100. Mike responds:
    Posted: June 25th, 2008 at 8:02 am

    Thanks Mike

  101. Marie responds:
    Posted: June 27th, 2008 at 11:59 am

    NO MORE SPAM SINCE INSTALLING YOUR BRILLIANT FORM!

    I KNOW I’M SHOUTING BUT I CAN’T HELP IT!

    You are my hero, Mike. (That was a hushed whisper.)

  102. Neil McDermott responds:
    Posted: July 7th, 2008 at 12:36 pm

    Hi Mike,

    Great form script!

    I have integrated it fully and it works fantastically expect I can’t get the CC to work.

    The form sends fine which suggets that it’s not an issue with the sendmail setup, however when I tick the “Check for email copy” box, nothing gets sent on to the email address set in the form.

    This also happens on the test-form.php - unless it takes longer for the CC emails to be sent than the actual email?

    Thanks,

    Neil

  103. Neil McDermott responds:
    Posted: July 8th, 2008 at 12:20 pm

    Thanks Mike,

    I’ll take a look.

  104. MadBabble responds:
    Posted: July 21st, 2008 at 9:51 am

    Thanks for this i need something like that

  105. Marti Mundo responds:
    Posted: July 26th, 2008 at 3:29 pm

    Hi Mike,

    I translated the language file in Catalan (es-ct), but I don’t know how to send you because I don’t found your email.

  106. Rick Bible responds:
    Posted: August 2nd, 2008 at 3:41 am

    I’ve used your forms for a while and love em. I actually have this one working within highslide js as a “popup”. It opens not in a new window but on the same page. Form works, sends mail to both parties. Is there a way to not have the page refresh when sent? I’m just tackling this problem. The popup naturally closes when the page refreshes so “thankyou” or “error” cannot be seen. Maybe this is just contrary to the inner workings of the form and it’s not possible. Thanks, Rick

  107. Tony Hayter responds:
    Posted: August 4th, 2008 at 9:38 am

    Mike

    I am trying to add a joining form to our website. Your version 3 looks just what I need. However I don’t fully understand what information is needed in the variables in your Readme.txt file, $send_email, $reply_email, $addressee, $web_site.

    These are clear to me in version 2.

    Would you help please?

    Tony

  108. MykeeCDN responds:
    Posted: August 4th, 2008 at 9:00 pm

    Mike, this is a FANTASTIC script - thanks for making it available to us all!

    One improvement request: it would be great to be able to flag certain fields as required and others as not. For my needs, I want Name and Phone required, all other fields optional or even not displayed.

    Thanks again, keep up the great work!

    /\/\

  109. Tom responds:
    Posted: August 4th, 2008 at 9:16 pm

    I think this is the best form I have tried, by far. Not working with PHP on regular basis I am amzaed how easy it is to create pages/forms that are hacked right away. I would like to see image-based validation of human entry rather than the static question “Fire hot or cold”. The PHP installation on my ISP has this as an available function. Any plans for this? Thanx.

    Tom

  110. Mer responds:
    Posted: August 4th, 2008 at 11:11 pm

    Hi Mike, I have a question that I’d like to ask but first thank you for sharing the script :)

    So I’m using the default theme for the contact form and I just want to change the size of the text form fields - name, email, message, etc. I edited the value of rows and cols in the form.php to make it smaller but yet all of them remained the same as the default original size. I’ve been fiddling around to see if I need to make any changes at some other files but I can’t find any. Can I get your help on this please? Thank you.

  111. Rick Bible responds:
    Posted: August 5th, 2008 at 10:35 pm

    got the popup issue resoved, works great. Thanks for a great email form.

  112. Daniel responds:
    Posted: August 31st, 2008 at 1:07 pm

    Hi, Mike. Great form script. I’m noticing one major issue with IE focus — in that it hijacks any other form elements’ focus, such as a search input field. I have a trivial value set with the focus/blur technique to show/hide the value if a user clicks within the box — in IE this will not work with the IE focus.js installed.

    Any suggestions on how to regain focus on form elements that aren’t a part of this email form? Or, is it a bug within your focus.js that can be corrected?

  113. Daniel responds:
    Posted: August 31st, 2008 at 4:32 pm

    I’d suggest then that you might wish to include an ID wrapper for the following DIV in the IE script:
    gb_form_div

    That way, you’re including the proper IE focus method that only calls on your form and doesn’t bump the others on the page. I mean, since it’s only being applied for IE, and we’re only requiring it for the form — what’s the point in having the function apply to all form elements on the page anyway?

  114. Daniel responds:
    Posted: September 1st, 2008 at 1:17 am

    So, in other words — there’s no way that you know of that will allow a theme developer to retain the onfocus/onblur value within a text-field while using your IE script.

    I might as well just strip the value out of the field then, because it’s become less functional this way — though, I’ll be stripping accessibility out of the text-field even more by eliminating its value attribute.

    In this development case, I don’t want to alter the plugin — I want to alter the theme. I feel that most plugins shouldn’t be altered because it inevitably creates an updating conflict where something gets borked as a result.

    Thanks though, Mike.

  115. Chris responds:
    Posted: September 2nd, 2008 at 1:54 pm

    Hi, Mike!

    Thanks for sharing this contact form with us. We are having a problem similar to Mark’s back in March. Our host has begun disallowing the method Open_basedir. They told us that we will need to rewrite the paths and path calls in the php contact form in order to resolve this issue. Currently, if I submit my contact form without filling in the required fields, I get this PHP Warning:

    file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../../..//files/error-log.txt) is not within the allowed path(s): (/home/cbpeary:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/cbpeary/public_html/gbcf-v3/files/functions.php on line 470

    Do you know a workaround for this? Thank you!

  116. Chris responds:
    Posted: September 2nd, 2008 at 9:44 pm

    Thanks, Mike. That didn’t work, but I tried deleting the last four lines off the trip_error method (lines 468-472) and that did the trick! I’m not quite sure why that fixed the problem, but for some reason my server had a problem with it.
    Thanks again for a great script!
    Sincerely, Chris

  117. Zach responds:
    Posted: September 3rd, 2008 at 4:20 pm

    Howdy Mike, hail from Keene, NH. I’m having an issue trying to reference my form from another subfolder…specifically whenever the field validation/reset occurs…it opens into the gbcf-v3 folder form.php page instead of sticking to the include(). Doi. I know this is probably an easy fix, but if you wouldn’t mind setting me straight, I’d really appreciate it.

    Great work, btw! :)

  118. Zach responds:
    Posted: September 3rd, 2008 at 4:38 pm

    P.S. - is there a way to create other fields, mainly radio buttons, in this form (for multiple selections)? I mean, I’m sure I could do it separately from the form itself…but if there is a more direct way, that would be splendid.

    Thanks Mr. Mike!

  119. Zach responds:
    Posted: September 3rd, 2008 at 5:13 pm

    Hey Mike,

    Thanks for the incredibly fast reply…(quite the moderator)…but the include works fine, the form comes up marvelously, css and all. However, whenever the Submit is made, whether error checking or resetting, my page with nav and all disappears, the form is by itself and no more css. Perhaps I installed wrong…perhaps I should move it into my contact/ folder where the contact page is located? The URL goes from “..mydomain.com/contact/index.php” > Submit > to “.mydomain.com/gbcf-v3/form.php#results”. Forgive my coding ignorance…

  120. Zach responds:
    Posted: September 4th, 2008 at 10:05 am

    ‘Morning…the form action itself is set to blank…(I noticed another commenter had a similar problem) but when I direct the form action to the contact/ folder, and the form is Submitted, it comes back blank, no mail sent. Zippo. I’ll look deeper into it today…I mean, it works fine when you just Submit without a form action…but like I said, it opens into just the form page without the style sheet, and no way to return to my page where its include()’d. Bewildering…but I’ll keep at it.

  121. Zach responds:
    Posted: September 4th, 2008 at 10:40 am

    /gbcf-v3/form.php#results

  122. Zach responds:
    Posted: September 4th, 2008 at 2:57 pm

    Hmmm…I’ve inserted the inlcude from the contact/index.php page as so:

    (content)

    (content)

    I suppose this is what you’re referring to as being ‘directly’ accessed. I just get my logic mixed up from time to time. I thought maybe there was a way to bypass this by changing the $set_directory but I guess its more straight-forward than that. I wanted to keep my existing page and folder structure as-is but it looks like I’m going to have to rethink…? Perhaps if I send you a few snippets of my code, you might better understand my situation?

  123. Zach responds:
    Posted: September 4th, 2008 at 3:02 pm

    Whoops…sorry…

    (content)
    <?php include('http://www.diversifiedcomputers.net/gbcf-v3/form.php'); ?>
    (content)

  124. Zach responds:
    Posted: September 4th, 2008 at 3:41 pm

    Hahaha, my bad…however, the actual form (v3) is not the contact page, but the training page. Still, the same problem exists which I will apply to the other form.

  125. Dave responds:
    Posted: September 4th, 2008 at 4:16 pm

    Mike…your form seems great. However, I can’t get the emails to go through. I got the SMTP settings we use to send our e*statements. The email is never received. The host did state that sendmail is not enabled on the server. Could this be the problem? If so, is there any way around it?

  126. Zach responds:
    Posted: September 4th, 2008 at 4:19 pm

    I KNOW! Ain’t it??! Anyway, I’m pretty sure its just my file/folder structure…I’ll get it!

    -Thanks

  127. Zach responds:
    Posted: September 4th, 2008 at 4:48 pm

    HAHA! Just needed to set the new directory, and reattach the form to the training/index.php page, and bing, bada, boom..we’re now in business…its directing the action to the correct page! Whew…just needed to get up and walk away from it :) I’ll get to the contact page later, hahaha!

    Thanks again for the assist, Mike, sorry to bother!

  128. Michael responds:
    Posted: September 13th, 2008 at 4:56 am

    Hi,

    Love your contact form. I plan on using it as often as possible!

    I am having a little trouble with the stylings.

    Primarily I have this site for a friend going.

    http://www.istillloveyou.com.au/clients/standtall/

    I’m happy enough with it in firefox but in IE it is a mess. The contact form sits itself in the middle of the page instead of to the left.

    If this is a specific IE bug that you know of I would just be happy with the name of it so I could research how to fix it (and not repeat it) myself.

    Kind Regards,
    Michael.

  129. Michael responds:
    Posted: September 25th, 2008 at 2:38 pm

    Hi Mike,

    Is it possible to use radio buttons for the Subjects instead of a drop down?

    Kind Regards,
    Michael.

  130. Phil responds:
    Posted: October 7th, 2008 at 12:36 pm

    Hi Mike,
    Just discovered this remarkable script.
    I’m new to this game, so I’m probably asking what everyone knows, but here goes.
    You say 666 permissions are required. I’m using a shared server, and 755 is the highest they will allow. But another PHP script I’m using apparently runs without permissions because suexec is installed.
    Does that apply here? PHP 4 is running as cgi. PHP 5 is available.
    Thanks

  131. Phil responds:
    Posted: October 8th, 2008 at 9:43 am

    Boo hoo!
    Doesn’t work! Even with suexec and the permissions set to 755 I get the error:
    “Not Found
    The requested URL /gbcf-v3/validation.php was not found on this server.”
    755 is the highest permissions my isp will allow on the shared server under any circumstances, no matter how secure the script you’re installling.
    There’s no other possible explanation is there (apart from the file not being there - which it is!)
    Thanks

  132. Phil responds:
    Posted: October 8th, 2008 at 11:37 am

    Thanks for clarifying.
    The path was definitely correct, so it brings us back to the permissions.
    My host’s faq says: “To avoid any problems, you should set your PHP scripts file permissions to 644, or user read and write, group and world read.”
    I’ve tried that as well as 755, and neither work. I have, as you suggest, written to my hosts in the hope that they have a separate policy for non-executables, but since the previous script I hoped to modify only required change to a config directory’s permissions, I’m not hopeful.
    I’ll let you know when I hear back from them.
    Best wishes

  133. Phil responds:
    Posted: October 8th, 2008 at 12:00 pm

    Hi again,

    This is my host’s response:

    “Many thanks for your query. You should have no problem changing the permissions to 666, however please be aware that there are certain security implications with this. Having permissions set to 666 would allow write access via the web. We do not recommend this but it is possible to set those permissions.”

    So you are right. It is possible to set 666 permissions. But they say ‘there are certain security implications’, while you say ‘It’s safe’. Which is true?

    Best wishes

  134. Phil responds:
    Posted: October 8th, 2008 at 1:13 pm

    Hi Mike,

    I’ve questioned them about their concern about security issues. They are concerned that the log file might contain confidential server information which an outsider could use as privileged information. Sorry to be so thorough about this, but I don’t want to be prosecuted for installling a script which, however unwittingly, gives out privileged information. Looking at your background and commitment I’m sure your positive intentions and professionalism are of the highest level, but because I’m not experienced enough to understand the way in which the script works and whether there are any risks involved or not, I have to understand more in order to make a decision when two sources tell me opposite things!

    What exactly does the logfile log, and why does it have to be included in the script?

    Thanks for your patience!

  135. Phil responds:
    Posted: October 8th, 2008 at 1:16 pm

    PS,
    and why does it need 666 permissions, why aren’t local user write permissions adequate?

  136. Phil responds:
    Posted: October 8th, 2008 at 2:39 pm

    Thanks Mike,
    Very clearly and reassuringly put!
    I’ll retry the installation.
    Best wishes

  137. Phil responds:
    Posted: October 8th, 2008 at 2:47 pm

    Hi again!
    On another much less significant, but still important issue:
    I see that the test form has a box near the foot labelled:
    “Check for email copy”.
    I realise there are variations of the page depending on language, but this mid-atlantic one is the one I would be most likely to use. Is there any way I can change that label for the box? To someone from the UK it says ‘Click here if you want the system to check this has been sent by email’ or something similar, and not ‘click here to send a copy to your mailbox’ which I think is what is meant.
    Is it easily editable, if so where?
    Thanks

  138. Phil responds:
    Posted: October 8th, 2008 at 11:32 pm

    Hi again,
    I couldn’t sleep - kept waking up thinking about making the installation of the script the most secure I can!
    Two things stuck me, the first is that if it could be installed above webroot, it would put the logfile out of reach of anyone on the web, and second, if the main directory was renamed, this would prevent anyone from finding it by searching.
    I see I can do the second (though I’ll try it on the server ‘as-is’ first to check for compatibility. But what about installing it above webroot. My research tells me that this can create problems for paths, but that depends how you’ve set up the script.
    Feedback appreciated.
    Thanks

  139. Andrew responds:
    Posted: October 9th, 2008 at 1:12 am

    Love this script,
    Recently I have encountered no copy being sent to individuals that are filling out the form but mail is received to the destination email for the website, I have used this same script with other site as I like the consistency it gives me but this problem is baffling me site in question is http://jpfpi.com/contact.php, any help with this would be much appreciated as I am new to the world of web design but find it easy with programmers providing scripts like yours.

  140. jody responds:
    Posted: October 9th, 2008 at 1:27 am

    I love this script! Thank you so much for sharing this! I have one quick question. Is there a way to delete just the required subject drop down and leep the text area for the subject? I have played with it a bit and got rid of it on the form itself but when you submit the form the error comes up that it has not been filled out. I am assuming that there is more to this than just getting rid of it on the form.php. Any suggestions?

    Thanks again for a great form.

  141. Phil responds:
    Posted: October 9th, 2008 at 10:55 am

    Hi Mike,
    So are you saying it’s not possible to for the user to easily configure the script in order to be able to store it out of the way of web access? Would too much configuration be involved?
    Best wishes

  142. Phil responds:
    Posted: October 9th, 2008 at 12:37 pm

    Sorry, I seem to have miscommunicated. What I meant was, putting the whole directory out of the reach of the web, and then calling it (just as you would a database) from the form itself. Would I need to have to make any changes to do this, or is that non-doable? Your comments about the logfile and my isps’s feedback have convinced me it’s not necessary, but is it workable with the script in its present form?
    Thanks

  143. Phil Maybury responds:
    Posted: October 9th, 2008 at 6:28 pm

    Thank Mike,
    I take your point. I would be more work than it’s worth. I just like to understand in order to take decisions.
    I’m tied up tomorrow, but I’ll try installing the script early next week and let you know how I get on.
    Best wishes

  144. Phil responds:
    Posted: October 13th, 2008 at 12:34 pm

    Hi Mike,
    Successfully up and running thanks. I’ve only had one matter of feedback from my clients yet, and that’s about the challenge question. “My only comment would be that where the question is for people to answer and it says that it is to prove you are a person perhaps you could add after ‘a person’ ‘and not spam’ otherwise some dumbo might wonder why you need to know if they are a person!”
    I would prefer to say something like “…a real person and not a rogue computer system” but I’m not sure if adding something like this creates any more security risk by drawing the attention of robots.
    I’m sure you can tell me - could you?
    Best wishes

  145. Phil responds:
    Posted: October 13th, 2008 at 1:23 pm

    Hi Mike,
    You’ve already answered my question by a visit to your own contact form where you use:
    - “Helps fight spam”.
    That will do nicely.
    Best wishes

  146. Ergin responds:
    Posted: October 13th, 2008 at 3:08 pm

    Hi Mike, may I say thank you first for this wonderful script.
    It’s been hours I was trying to inbed (???is it the correct word) into the HEAD


    DIRECTLY AFTER

    AND
    Into BODY of my HTML contact page UNsuccesfuly. It is just driving me insane.
    My test contact page is working perfect.
    Any suggestion is more than appriciated.

  147. Ergin responds:
    Posted: October 14th, 2008 at 3:21 am

    ahhh I am sorry Mike. Basically I am referring to Script installation Point 9. I have followed the instructions but without success. I would be so grateful if you could you look at my “Contact Us” page source code. I have tried so many ways of the path. I am thinking that maybe my page is already connected to a CSS style sheet. Could this be the problem? Would really appreciate your advice.

  148. Ergin responds:
    Posted: October 14th, 2008 at 12:37 pm

    Dear Mike, my sincere apologies, being an almost novice is rather embarrassing sometimes.
    I have followed your advice again but unfortunately I still am not able to see the form.
    would you terribly mind if you check my source code again?
    it is obviously in my website.com/contactusnew.html
    1) When I uploaded the gbcf-v3, my Fireftp was in Binary mode
    2) gbcf-v3 is in main directory where all my html pages are.
    3) Only change I made is renaming blue.css to default.css (as I said my test page (in blue) works perfect)
    Thank you again.

  149. Ergin responds:
    Posted: October 14th, 2008 at 1:46 pm

    OK MIke, apparently PHP is fully supporet by my Domain Server (ICDsoft). Yo my surprise support ticket was answered almost immediately.

    So I decided to rename the web page to contactusnew.php, published it and this is what I see in my page…

    Warning: include_once(www.ayvalikholidayhouse.com/gbcf-v3/form.php) [function.include-once]: failed to open stream: No such file or directory in /home/ayvalik/www/www/contactusnew.php on line 149
    Warning: include_once() [function.include]: Failed opening ‘www.ayvalikholidayhouse.com/gbcf-v3/form.php’ for inclusion (include_path=’.:/usr/local/php5/lib/php’) in /home/ayvalik/www/www/contactusnew.php on line 149

  150. Ergin responds:
    Posted: October 14th, 2008 at 5:26 pm

    Well Mike, you’ll be glad to know that I have done it. When I design the rest of the form (hopefully I will not disturb you again) I think I owe you BIG time. My appreciation will also be reflected by clicking on the “Donate” button.
    One question comes to my mind…..I thought by putting the “include Function” one would not have to change HTML to PHP of my web page. I now have to change all the relative links to.
    I suppose I must have misunderstood, mustn’t I?

  151. Tim Taylor responds:
    Posted: October 15th, 2008 at 5:14 am

    Hi Mike

    A great script and a great service to web users and publishers alike - many thanks!

    Has anyone noted that the text at the very bottom of the form (includes ‘blocked’ and the link to your site) when viewed in IE7 is misaligned? It is bisected by the bottom boundary of the form.

    Here’s an example at I’ve tried it using the default.css as well and it makes no difference. I don’t use IE7 but unfortunately many people still do!

    Cheers, Tim

  152. Tim Taylor responds:
    Posted: October 15th, 2008 at 7:05 am

    Thanks for that Mike, I’ll turn the fieldset border off.

    Tim

  153. Ergin responds:
    Posted: October 16th, 2008 at 6:05 pm

    Hello Mike,
    Today I set up my Turkish Contact Form by renaming your form to gbcf-v3tr. Everything working apart from the Turkish charecters displaying wrong when it is online.
    Setup as below:
    $language = “tr”; // Name of language file
    $char_set = “ISO-8859-9″; // Character set for email
    You can see it here……mysite/iletisim.html
    I wonder, what might I be doing wrong this time please?

  154. Ergin responds:
    Posted: October 16th, 2008 at 7:50 pm

    Thank you for your answer Mike.
    UTF8 did not work. But I have changed all the problem characters with proper character entities… So the problem solved…Thanks a bunch again.

  155. Phil responds:
    Posted: October 20th, 2008 at 2:44 pm

    Hi Mike,
    I’ve been struggling with a second installation of the script on another virtual server for several hours now. As far as I can see, I’ve correctly modified the CONFIG.php file (I’ve checked that the quotes and semicolon are intact on each line) given 666 permissions to the logfile, and modified the language file.
    Yet when I run validation.php or test-form.php I get the error:
    “Configuration Error:
    “The default reply-to email, , needs to be set or changed.”
    I’ve simply copied over the configuration files from the other installation, and changed the domain-specific information, so the files should be spot on.
    Is there anything else that can result in this error? It’s probably something simple I’ve missed!
    Thanks for your help.

  156. Phil responds:
    Posted: October 20th, 2008 at 4:22 pm

    Thanks Mike,
    But as I said, I checked the config file several times.
    The line below is copied direct from the uploaded version of the CONFIG.php file (but anonymised as it’s publicly posted here):

    $reply_email = “noreply@thedomaininquestion.co.uk”; // Reply email

    If that’s not it, what ever could be going on?

    Best wishes
    Phil.

  157. Kai Davis responds:
    Posted: October 20th, 2008 at 5:48 pm

    Hi Mike,

    Thanks for the script! I was wondering if you could shed a little more light onto Jody’s question. I wanted to remove the ’subject’ drop down box and have the email set to a default subject. I think this is doable, but I’m not sure where I would start.

    Thanks,

    Kai

  158. Phil responds:
    Posted: October 20th, 2008 at 6:50 pm

    Hi Mike,
    No, I made no changes at all to the script - that’s not the sort of thing I’m capable of.
    I guess my only route now is to start with another fresh download and take it step by step again.
    Best wishes

  159. Phil responds:
    Posted: October 23rd, 2008 at 8:12 am

    Phew,
    Re-downloaded the script and set it up on the same domain and now it validates and the test form works. In the meantime I’d taken the precaution of purchasing a dedicated text editor, as I guessed that somehow the config file had got corrupted when editing. Though it was only fair to include this feedback on this page, to make it clear it was not a problem with the script!
    So the page is up and the test form working in a different directory. So my next step is to create the real form based on my own site designs. I guess the simplest way ins to ‘include’ an edited-down test-form.
    1. How do I remove the form information at the top of the page that includes: Form Version: v3 - Build Number: B3.20081002.01 - Model Number: SASU - Blocked: 0 - Help »? I guess the bar itself is needed to indicate successful submission and error states.
    2. Am I right in thinking that to achieve the layout you already have, I need a css file which includes your css file, plus the css styling in the of the page?
    3. Is there anything else I should delete from the test form for security or operational reasons?
    4. If I’m ‘including’ the file in a page, do I need the of the page, as there will already be a in the main page the form is ‘include’d in.
    Thanks for your help.

  160. Phil responds:
    Posted: October 23rd, 2008 at 8:14 am

    Sorry, my typing was appalling! What I meant to say was:
    4. If I’m ‘including’ the file in a page, do I need the “” of the form page, as there will already be a “” in the main page the form is ‘include’d in.

  161. Phil responds:
    Posted: October 23rd, 2008 at 8:16 am

    No, it’s not my typing, it’s the form removing things inside anglebrackets.
    This is what I meant: 4. If I’m ‘including’ the file in a page, do I need the anglebracket-head-anglebracket of the form page, as there will already be a anglebracket-head-anglebracket in the main page the form is ‘include’d in.

  162. Phil responds:
    Posted: October 23rd, 2008 at 8:57 am

    Thank Mike,
    I didn’t twig to form.php being included in test-form!
    I was actually using notepad, but I wonder if I had word-wrap turned on.
    Now I’ve bought EditPadPro which seems pretty intelligent, and along with the more expensive UltraEdit and notepad++ was one of the top three in a survey I came across.
    Thanks for your help. Now to create the form page…
    Best wishes
    Phil.

  163. Phil responds:
    Posted: October 23rd, 2008 at 10:13 am

    Sorry Mike,
    I still need a bit of handholding…!
    Bear in mind that validation went fine for the script, and the test form worked OK…
    I’ve ‘included’ the form.php file in my page using , it’s in a .shtml file which my host requires for includes, and it’s obviously ‘including’ the file because its contents appear in the Dreamweaver ‘design’ window. But when I run the page remotely I get:
    [an error occurred while processing this directive] and my error logs show: “unable to include file “../gbcf-v3/form.php” in parsed file…”
    Have I missed something?
    Best wishes
    Phil.

  164. Phil responds:
    Posted: October 23rd, 2008 at 10:15 am

    Sorry, that should be
    I’ve ‘included’ the form.php file in my page using angle-bracket–#include file=”../gbcf-v3/form.php” –angle-bracket…

  165. Phil responds:
    Posted: October 23rd, 2008 at 10:31 am

    aha,
    Just noticed something.
    Shouls form.php be moved to the directory where the page including it is?
    If so, if Dreamweaver asks to update links, should you say yes or no?
    And do I need to change any path in form.php?
    I’ve just noticed that there are several other error messages saying that files cannot be found which are not included in the main page, so must be coming from the included form.
    Could you point me in the right direction please?
    Thanks
    Phil.

  166. Phil responds:
    Posted: October 23rd, 2008 at 10:46 am

    Hi again,
    Moved the form.php both with and without letting Dreamweaver update the links, and obviously the include link is working, because I’m now getting an error-message on the page: Direct File Access Prohibited
    Any help you can give would be appreciated.
    Phil.

  167. Phil responds:
    Posted: October 23rd, 2008 at 10:51 am

    PS:
    Logfiles show that the system can’t find the pages:
    public_html/pages/

  168. Phil responds:
    Posted: October 23rd, 2008 at 11:11 am

    Oh no, I’ll try again:
    Logfiles show that the system can’t find the pages:
    public_html/pages/”left-arrow-bracket”
    and public_html/pages/styles

  169. Phil responds:
    Posted: October 23rd, 2008 at 1:36 pm

    Hi,
    Thanks for responding. I used the style of include I did because when I used the one specified it did not work either! I have another include on the page (which is on every page) calling another html file from the shtml file, and that’s working fine.
    I’ve now checked and corrected the paths and added the include with the correct path to form.php to the body. I’ve even tried creating a totall blank html document with only the gbcf-v3 code in the head and the include in the body. But each time I now simply get a blank page.
    I’ve re-checked by error logs, and this is the result:
    [Thu Oct 23 18:22:22 2008] [warn] Cannot get media type from ‘cgi-script’
    Oddly enough this is exactly the same error that I was getting with another php script I’ve been trying to install.
    Like this one, it was installed exactly as per instructions, but with this same error and a blank screen. Yet my ISP insists everything is fine on the php installation, with php running as a cgi.
    I hope this is more coherent. Can you offer any advice?
    Thanks
    Phil.

  170. Phil responds:
    Posted: October 23rd, 2008 at 2:11 pm

    Hi Mike,
    I thought I’d submitted another post, but it seems to have vanished!
    I originally used the style I did for the include because I couldn’t get it to work the way suggested, and I already had another include working on the page in that fashion.
    I’ve corrected all the paths, and added the specified include, and even created a blank html page with only the css/script information for gbcf-v3 in the head, and only the include in the body.
    When I run the page, I just get a blank page, and my error logs give me:
    [warn] Cannot get media type from ‘cgi-script’
    I’ve been reading around and discovered a page that suggests that this error might be related to the fact that my host runs PHP as a cgi, so a php.ini is needed in the shared hosting account to resolve the problem. But what should be in the php.ini?
    I’m totally at sea now, because I can’t understand why the test-form works, but a blank page form doesn’t.
    Any help you can give would be appreciated.
    Thanks

  171. Phil responds:
    Posted: October 23rd, 2008 at 2:14 pm

    PS: In the css and script references in the header, < and > be used instead of the right and left arrow brackets, because when I try to validate the page at the W3C validator, it does not validate with them as arrow brackets.

  172. Phil responds:
    Posted: October 23rd, 2008 at 5:25 pm

    Thanks for being so straight about it Mike.
    The include I used was from an actual tutorial on the web, but for includes on html pages. The other include is an html include on an html page.
    Having read further, can the include you propose only be used within a php page?
    I too am totally baffled by the cgi reference, and so, it seems, is everyone else on the web. It seems it has been cropping up in relation to a repeated collection of different php scripts where php is running under suexec as a cgi script in a shared hosting environment.
    But the disturbing thing is that wherever it’s occurred (I must have read a dozen different threads) nobody comes up with an answer. For someone as new to even using php scripts as I am, this is not only disturbing but distressing. But I’m faced with the same problem each time. The authors know about their scripts, the hosts know about their installation, but because there are no clearer error messages, neither can get to the bottom of it.
    I’ll let you know if I find the solution.
    Best wishes

  173. Phil responds:
    Posted: October 24th, 2008 at 10:32 am

    Hi Mike,
    Success! The form is fully styled and working!
    It may not appear so from the background above, but I’m an avid reader of manuals, help files, faqs and other documentation. But because of my lack of experience, my brain does not always grasp the significance of each piece of information. Sometimes I think I’ve understood, and when it doesn’t work, I then try something else, which is what happened above. I was convinced that my host’s knowledgebase said that naming a file .shtml was enough to get includes working. Which was why I took the action above. But apparently you need an .htaccess file. Once added to the directory, the script works like magic.
    Thanks for your patience and help.
    Best wishes
    Phil.

  174. jo responds:
    Posted: October 25th, 2008 at 1:34 pm

    Hi,
    many thanks for an excellent form! It worked first time but I need to remove the “country” name and input field. How do I do that please?

  175. HaiHappen responds:
    Posted: October 28th, 2008 at 8:52 am

    Hello,

    can i use this plug-in twice in one word-press blog?

    i need it a second time with less fields. only name, email and comment field.

    thank u and best regards from germany

  176. HaiHappen responds:
    Posted: October 28th, 2008 at 9:35 am

    Thank u for this answer. I mean the WP build.

    Is it possible to make a copy of the plugin-folder and only “rename” something to use it twice??

    like:

    plugin-folder:

    wp-gbcf
    wp-gbcf2

    ??

  177. Patrizia Sabatini responds:
    Posted: November 7th, 2008 at 12:39 pm

    Hi Mike, and thanks for the fantastic script. I am making a dual language website, and I need the form to be either in Italian or English depending what the user selects. I know I could put two copies of the script in different directories, but I’m sure there’s a better way.

    I don’t know much about PHP but I’m learning. Is there a way to pass the $language variable from my calling page?

    I really appreciate any advice you could give me.

    -patrizia

  178. Steve S responds:
    Posted: November 11th, 2008 at 6:09 am

    I have a problem. I have a Japanese Contact form. Everything works great for which I am very grateful. Except: When I send the form locally (with MAMP php set up on a MAc) the mail I sent to the webmaster (me) the Subject Line in the header is clear In Japanese letters, BUT when I do the same on the ISP’s webserver the letter sent by the form to the webmaster has the subject in Garbage Text ie. Japanese fonts not rendering. All files have UTF-8 encoding. I even changed all fonts on the CSS where possible to Japanese fonts.
    The ja file is fantastic, I was translating the en file myself, not too easy for me.
    Other letters I receive from the ISP with Japanese subject lines are OK.

    Any ideas appreciated

    steve
    Okinawa

  179. steve responds:
    Posted: November 11th, 2008 at 10:51 am

    Hi Mike
    Thanks for the response. I tried changing the Char set on the config, form and test.php pages to all available JA char sets. This did not change the response e mail. But did mess up the rendering of the test.php page. Also this caused the body text of the email to be garbage on IE7, I put the Config Char set back to UTF-8 and the body text became readable. Also on IE 7 only, the subject after the bracketed words, do not show up.

    To summarize with settings back to UTF-8. this is what I get:

    Locally:	                   From: [email removed] Subject: [Friendly's] 店舗案内
    From ISP server:                   From: [email removed] Subject: [Friendly's] åºèæ¡å
    Receiving mail in Outlook Express: From: [email removed] Subject: [Friendly's]
    

    Thanks again.
    Steve
    Okinawa

  180. jo responds:
    Posted: November 11th, 2008 at 4:10 pm

    Hi,
    I was wondering how I can change the colour of the asterisk (*) on required fields. At the moment it is red and I need to make if different!
    Many thanks in advance. Your most humble servant! - Jo :) )

  181. Paul responds:
    Posted: November 19th, 2008 at 12:04 pm

    Hi Mike -
    I’ve uploaded your form and it seems to load properly. I’ve directed it to send email to a godaddy account that redirects it. I know the forwarding is working because I can send directly to it and it arrives properly. However I can’t seem to get your form to send it even though it says it’s successful. I also don’t receive a copy of the email I’ve sent, though I’ve requested one. Any thoughts? Here’s my link: http://tinyurl.com/5wcrfg

    Thanks
    Paul

  182. Dan responds:
    Posted: November 20th, 2008 at 12:45 pm

    Quality tool, used an old php form script for my contact page on a few website I have done but this has become my main tool of choice. Easy install and no spam!!! Great!!

  183. from Holland responds:
    Posted: November 24th, 2008 at 2:52 pm

    Anybody familiar with this error:

    Warning: mail() [function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE in /home/xxx/domains/xxx.nl/public_html/gbcf-v3/files/functions.php on line 1139

    What can I do make it work?

  184. Gary Miller (in Drymen, Scotland) responds:
    Posted: November 27th, 2008 at 8:56 am

    Hi Mike,
    Thanks for the script! I’ve been looking for a really good, accessible (free!) script like this for ages…now, by accident, I find the perfect solution. For a non-programmer like myself, it’s relatively easy to set up - just as long as you follow the installation and configuration instructions carefully.

    Wonder if you could help with one teeny weeny problem please…

    When I process the form with required fields missing and hit submit, the correct page comes up listing the missing fields OK. Unfortunately, instead of being a neat horizontal line with the errors listed in a linear fashion, it becomes an ugly, large rectangle with the errors listed vertically. I’ve been up most of the night with this and am rapidly losing what little hair I have left!

    The form can be found here, don’t worry about the layout of the rest of the page as I’ve still yet to style the contents.

    Any ideas please?

    Cheers!

  185. Gary Miller (in Drymen, Scotland) responds:
    Posted: November 27th, 2008 at 9:44 am

    Mike,
    Thanks for the swift response! Sorry, I should have checked the generated source as a matter of course…please understand that it was a loooooong night!

    I’m using niftyCorners to add rounded corners to various items on the page. Works perfectly with everything else and it appears that is where the problem lies. Off for a close scrutiny of the scripts/css involved.

    Thanks again,
    Cheers!

  186. Gary Miller (in Drymen, Scotland) responds:
    Posted: November 27th, 2008 at 11:18 am

    Mike,

    Previous post seems to have disappeared into the Akismet void. The generated source is a result of Nifty Cube. But I’ve located the problem…I was looking in the wrong direction altogether. A missing tag was the problem. Only excuse I have is one of tiredness.

    I certainly never meant to cast any slur on such a fine script. *smile*

    Thanks for the response.

    Cheers!

  187. Gary Miller responds:
    Posted: November 29th, 2008 at 7:09 am

    Mike,

    Of course…I forgot…Happy Thanksgiving!

    I’m trying to do something about NiftyCorners. I’ve managed to cut out a lot of the generated source but whatever the script is applied to it seems to generate the extra code.

    One other quick question please; any idea why the required asterisks aren’t showing up on the form? I’ve looked the script over several times now, but can’t quite put my finger on it.

    Many thanks.

  188. Gary Miller (in Drymen, Scotland) responds:
    Posted: December 1st, 2008 at 3:22 pm

    Mike,

    Thanks…that’s got its sorted. I appreciate the feedback and help. I can’t afford much as I’m unemployed at present, but I will be making a donation in the next 4 or 5 days.

    Thanks again for a really great script!

  189. James responds:
    Posted: December 11th, 2008 at 7:27 pm

    Hi,

    Is it possible to show a more detailed UA?

    I’d like to see this:
    User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4

    vs:
    UA: Firefox on Windows

  190. James responds:
    Posted: December 11th, 2008 at 8:59 pm

    Hi,

    I found this in settings.php but am not sure what to do to be honest:
    ### Sniff browsers to return a better string

  191. James responds:
    Posted: December 12th, 2008 at 9:09 am

    Thank you, that worked.

  192. Cole responds:
    Posted: December 16th, 2008 at 7:23 am

    I would like to alter the text “Enter your info in this form to send us an email”, but cannot find it anywhere in any of the php files. Can you help me?

  193. Tim responds:
    Posted: December 17th, 2008 at 11:50 pm

    Hey Mike! Awesome work, and it’s much appreciated. I’d really like to be able to use v3 as standalone on a WordPress page (even if not as a plugin) — is this something I could help with? I’ve looked through your scripts, but instead of devoting miles of time trying to get up to speed on it like you are — what’s the hangup? Is it in the functions, the set_directory, in passing the relative URL / permalink structure from WP to the form?

    If there’s some way I could contribute labor-wise, I’d be glad to help.

  194. Tim responds:
    Posted: December 18th, 2008 at 2:51 pm

    Ah well. I fiddled around with it for awhile and got it to “work” (meaning show up) on a template page by changing set_directory to the template path in form.php and functions.php, but I’m guessing something in the way WP (2.7) redirects/rewrites to display theme content is confusing the form action. I couldn’t figure out how to get the posted data back to the gbcf script to send the mail and display the success message - kept getting a 404, even though my browser’s showing it’s at the right page.

    Bah-humbug. I’ll just wait for the Experts to release the plugin. :-) Merry Christmas (or whatever you might be celebrating)!

  195. Tim responds:
    Posted: December 18th, 2008 at 5:38 pm

    Thanks for the response! I did try that, but failed … WP comes back with a 404 Not Found. In my case, I have the form on a page with a bare-bones page template: header, content (with gbcf form), sidebar and footer and my permalink structure lists pages directly from the top level: i.e. www.mysite.com/page

    Changing form_action in CONFIG.php to the full theme directory (wp-content/themes/mytheme/my-template.php) fails because it bypasses the WP engine. Changing form_action to the page name (/page or even /page/) is equivalent to what gbcf does naturally, and results in a 404. Changing form_action to a full URL to the page (http://www.mysite.com/page) is equivalent to the previous configuration - results in a 404. I also tried http://www.mysite.com/?page_id=1 and http://www.mysite.com/index.php?page_id=1 (with my appropriate page number, of course) and get the same 404.

    I’m guessing it’s got something to do with the rewrite for “purty” permalinks, which I don’t want to give up for SEO etc. OR… it has to do with passing the POST info through the WP engine to display the theme. I’m guessing maybe the latter since a standard structure passing the page_id with GET fails the same way… ?

  196. Tim responds:
    Posted: December 18th, 2008 at 5:39 pm

    Should have included: the form does show… the 404 is after form submission.

  197. Tim responds:
    Posted: December 18th, 2008 at 5:44 pm

    D’oh! Another correction… using the standard structure ?page_id=number results in “sorry, no posts matched your criteria” — not a 404.

  198. John responds:
    Posted: December 18th, 2008 at 8:58 pm

    Hello Mike,
    I started using your script on our website and it has worked successfully. Recently, we migrated our site to a new server (same host) that supports php 5.2.6. Using the script, with same configuration settings for the new server, the form has has stopped functioning. The form page loads properly, but after filling the form and submitting it, the user is redirected to the main page of the site, not the designated thank you url page. No email is sent as a result of the form submission. Oddly, if the test-form page is filled and submitted, an email is sent (but the thank you url is not opened). I’ve checked the server error log, no errors. I’m having no other email or server issues. I’m also in conversation with the software support that is used on our site. Any ideas or suggestions?

    http://www.greencardepot.com/index.php?a=28&b=147
    Thanks for your help,
    John

  199. Tim responds:
    Posted: December 18th, 2008 at 9:19 pm

    Aha! I found this link over at the WP Support Forums: http://wordpress.org/support/topic/182955

    Looks like using name=”name” in an input field conflicts with something going on in WP’s SOP.

    So…. I changed the name name (ha ha) to “gbcf-name” in the input field of form.php and in functions.php where it picks up the post data, and

    *drumroll*

    I’ve got my Mojo back, yeah, baby! :-)

    All one has to do (at least all *I* had to do in WP 2.7 with a custom theme) tp make gbcf-v3 work in a WP page template is change:

    In form.php:


    $set_directory = "gbcf-v3";

    and

    name="name" value=”" size=”32″ maxlength=”" id=”name”>

    to something like


    $set_directory = "wp-content/themes/mytheme/gbcf-v3";

    and

    name="gbcf-name" value=”" size=”32″ maxlength=”" id=”name”>

    and in functions.php:


    $set_directory = "gbcf-v3";

    and

    $name_value = clean_var($_POST['name‘]);

    to something like


    $set_directory = "wp-content/themes/mytheme/gbcf-v3";

    and

    $name_value = clean_var($_POST['gbcf-name‘]);

    Might be a good proposition going forward to add a “gbcf” or some other kind of unique-ifying label to the input names, etc… No?

    Thanks again for taking the time to think about it, and I hope this helps you in some way.

  200. Tim responds:
    Posted: December 18th, 2008 at 9:28 pm

    Argh. I’m a terrible commenter….. Let’s try this again, switching with HTML codes….

    In form.php:


    $set_directory = "gbcf-v3";

    and

    <input type="text" class="text-med" name=”name” value=”<?php echo $name_value; ?>” size=”32″ maxlength=”<?php echo $name_len; ?>” id=”name”<?php echo $name_border; ?><?php echo $x_or_h; ?>><?php echo $add_break; ?>

    to something like


    $set_directory = "wp-content/themes/mytheme/gbcf-v3";

    and

    <input type="text" class="text-med" name=”gbcf-name” value=”<?php echo $name_value; ?>” size=”32″ maxlength=”<?php echo $name_len; ?>” id=”name”<?php echo $name_border; ?><?php echo $x_or_h; ?>><?php echo $add_break; ?>

    and in functions.php:


    $set_directory = "gbcf-v3";

    and

    $name_value = clean_var($_POST['name‘]);

    to something like


    $set_directory = "wp-content/themes/mytheme/gbcf-v3";

    and

    $name_value = clean_var($_POST['gbcf-name‘]);

  201. Tim responds:
    Posted: December 19th, 2008 at 2:05 am

    *hearing Indiana Jones theme music*

    At least I’ve paved the way for something. :)

    Dunno if it’s useful or not, but I really appreciate the GB contact form. Thanks again, for taking the time to notice.

  202. Tim responds:
    Posted: December 19th, 2008 at 2:12 am

    Oh! If you want to see it in action, you can go to http://finallycreative.com/contact

    Upgraded to ridiculous, self-indulgent commenter… not just terrible :)

  203. Ed Boal responds:
    Posted: January 31st, 2009 at 1:55 pm

    Hi Mike

    This script has now become ‘the’ framework script I use for developing forms for my clients projects. I just have one question - how do you change the text in the form labels? Which PHP file are these stored in? I want ‘Referred by’ to read as something else?

    Thanks for this script.

    Ed

  204. Anton responds:
    Posted: February 9th, 2009 at 4:00 pm

    Brilliant! It looks great, and can’t wait to test it out.

    What I really would like to know, is how to create a Thankyou page, so that I can set the option to “yes”. It would be even better it the Thankyou page could be personalized, e.g. if someone called “Anton” submitted the form, the Thankyou page says “Thank you Anton, for completing the form…”. I’ll be the first to admit that my knowledge of PHP is zero, so a complete code example would be much appreciated. I can then copy and paste into a new file.

    Thanks in advance!

  205. Anis responds:
    Posted: February 10th, 2009 at 8:49 am

    Hello,
    thank you for sharing your contact form, it’s a great script and i like it.
    It’s working very well on a classic lamp server (and maybe iis, i didn’t try) but i have a problem with a specific (i would say strange) mutual hosting.
    The host use apache but when i try to chmod 666 the log file, it doesn’t work. All the files have xxx rights (which means nothing i guess) so i thing it’s an apache server installed on a microsoft server (2003 or whatever)

    So in this specific hosting environment, the error “Environmental Error: The error log file, error-log.txt, is not writable! Set CHMOD to 666.” is showing and there’s no way to change the chmod.
    I don’t know if php can write in the error-log file, maybe so, but chmod 666 will never happened on this server.

  206. Alex Quinn responds:
    Posted: February 10th, 2009 at 12:54 pm

    Hi Mike,

    Must say, great form and fantastic site/community.

    Just wondering if you’d thought about having a field to validate the email address that someone has entered?

    Or even if this has already been done by someone?

    Thanks,

    Alex

  207. Jeremy Carlson responds:
    Posted: February 17th, 2009 at 2:55 pm

    Hi Mike,

    This is a great script. I haven’t seen anything else which seems to cover all the bases so well. I did have a contribution to suggest - adding tabindex to the various fields.

    I figured some folks might not want to use tabindex, or might, for various reasons, want to start w/ a higher number than 1, or step by more than 1 (okay, not really sure why, but JUST IN CASE…)

    Here’s how I did it:

    1) In the CONFIG file, I added these lines:
    $tabindex = TRUE; // TRUE or FALSE
    $tabstart = ‘1′; // Edit to start w/ a higher #
    $tabinterval = ‘1′; // Wanna go by 10s? Change this.

    2) Then I created a function in functions.php - we’ll see how this code works for the comment form here:
    function tab() {
    global $tabindex, $tabstart, $tabinterval;
    if ($tabindex) {
    echo “tabindex=\”$tabstart\”";
    $tabstart = $tabstart+$tabinterval;
    }
    }

    3) Finally, I just added a php block w/ ‘tab();’ to the beginning of all input, select, and textareas, then took that back out of the honeypot and hidden input fields.

    Now my contact form tabs gracefully through in the order I want, etc.

    Thanks again for the form, and looking forward to the WP v3.

    -Jeremy

  208. Justin responds:
    Posted: February 18th, 2009 at 5:02 pm

    Hi Mike,

    Great script! One quick question … how can I turn off the anti-spam question (I know, why turn it off … but I have my reasons)?

    Thanks again for your work!

Sorry. Comments are closed.




Note: This is the end of the usable page. The image(s) below are preloaded for performance only.