Close Panel
 
 

LightForm is not maintained anymore! You can still download it but there will not be any future releases and support for this script.

LightForm is a free Ajax/PHP contact form. It combines FormCheck2 for fields validation and NiceForms to style text fields and textareas.

Demo:

View Demo »

lightformpreview.jpg

Download:

Use of this contact form is free of charge but the copyright notes in the footer must remain intact.
I would appreciate if you send me the URI of your site if you use LightForm.

Download (373.4 KiB, 72,140 hits)

Changelog:

October 09, 2008: LightForm now works with Niceforms 1.0 which allows to a set a different size for inputs, textareas and buttons. Input bug fixed in IE8 and files have been compressed to improve load time (just one stylesheet and only one images folder. All the javascripts are in the same folder).
May 28, 2008: Textarea bug fixed.

Features:

  • Form Validation using FormCheck2.
  • Spam Check.
  • Display user IP, user agent and referrer in the message.
  • Display a dialog box when message sent succesfully.
  • Inputs and textareas are styled with NiceForms.
  • Works in the most recent browsers (IE6+, Firefox, Opera, Safari and Netscape).

Installation:

  1. Download and unzip the file
  2. Copy all the files to your root Directory

Usage:

Open index.php in your web editor (e.g. Notepad) and change the email address line 55:
$to = 'yourname@domain.com';

License:

The CSS, XHTML, PHP and design is released under Creative Commons Attribution v2.5.

FormCheck2 is released under the MIT license.

NiceForms is released under no specific license. You are free to use and modify but you must provide credits to the author.

Caution

Form validation won’t work anymore if users disable Javascript.

Technorati Tags: , , , , ,

Popularity: 50% [?]

 

Related posts

| Subscribe to Feed | Email the author

149 Responses to “LightForm ::: Free Ajax/PHP Contact Form”

  1. 1
    Moo Floor » FormCheck v. 1.3 Says:

    [...] A new default theme is avalaible (thanks to Jeremie!) [...]

  2. 2
    zack Says:

    Great. It works smoothly.Firebug detects a slight error on the congrats page though:obj has no properties while (obj.offsetParent) {on line190 of niceforms.jsKeep up the good work.

  3. 3
    dora Says:

    It looks beautiful!Good work!I’ve translated it a little to Simple Chinese.You can visit it here.

  4. 4
    artico Says:

    Hi there, i got a question about this form…How I can change the question and of course the answer of the part “are you human?” I really don’t know much of javascript.I appreciate any help, thanks.

  5. 5
    Jeeremie Says:

    Artico,

    open index.php in a web editor and go to line 152 and change the text:
    <label for="spamcheck"><span class="blue">*</span> <acronym title="[ Spam prevention ]"><strong>Are you human?</acronym> : <span class="blue">2 + 3 = ???</span></strong></label>

    To change the answer, open /js/formcheck/formcheck.js and go to line 155:
    spamcheck : /^[5]+$/,
    … and change number 5 for another number.

    You must also change the question line 136 to match your answer:
    spamcheck : "2 + 3 = ???"

    Let me know if you could do it.

  6. 6
    artico Says:

    Hi Jeeremie, that was easy to change, thanks for your help.

  7. 7
    paco Says:

    I wanted to know how could I add some radio and checkboxs to my form, because they don’t appear…Thank a lot!

  8. 8
    Jeeremie Says:

    It is normal Paco, I didn’t create radio and checkboxes images for this form. If you really need some for your form, go to Badboy.ro and download his form to get the images.

    I hope it helps.

  9. 9
    Paco Says:

    Merci pour le lien!!Oh j’avais pas vu que tu étais francais, j’ai parlé anglais pour rien :) Bonne continuation, et pour le blog, il va droit dans mes RSS ^^…

  10. 10
    Peekholes Says:

    IS it easy to add more fields?

  11. 11
    JP Says:

    Very nice! how can i put this form into my About page in Wordpress?Thanks!

  12. 12
    JP Says:

    Hi again, i translate the “LightForm\js\formcheck\lang” formcheckLanguage = {    required     : “Campo requerido.”,    alpha        : “Este campo acepta solo caracteres alfabéticos.”,    alphanum     : “Este campo acepta solo caracteres alfanuméricos.”,    nodigit      : “No se aceptan dígitos.”,    digit        : “por favor ingrese un número válido.”,    digitmin     : “El número debe ser de al menos %0″,    digitltd     : “El valor debe estar entre %0 y %1″,    number       : “Por favor ingrese un número válido.”,    email        : “Por favor ingrese un email válido:”,    email        : “Ingrese un email válido: <br /><span>Ej. sunombre@dominio.com</span>”,    spamcheck    : “<span>2 + 3 = ???</span>”,    phone        : “Ingrese un teléfono válido.”,    url          : “Ingrese una URL válida: <br /><span>E.g. http://www.dominio.com&lt;/span&gt;“,    confirm      : “Este campo es diferente de  %0″,    differs      : “Este campo tiene que ser diferente de %0″,    length_str   : “Texto muy corto, tiene que ser entre %0 y %1″,    lengthmax    : “Texto muy corto, debe tener un máximo de %0″,    lengthmin    : “Texto muy corto, debe tener por lo menos %0″,    checkbox     : “Por favor marque el chekbox”,    radios       : “Por favor seleccione un radio”,    select       : “Por favor seleccione un valor”}If you want i can translate all files, please help me with Wordpress!Thanks again

  13. 13
    Alex Says:

    I quite like this contact form you have made.If you are using this on your website then I reccomend you download the YUI Compressed mootools as it is only 65kb compared to the supplied 180kb.I am currently trying to turn this into a simple wordpress plugin.  It wont have any of the fancy functionality and admin interface of cforms though but you should still be able to get it to work with minimal php/html coding

  14. 14
    Jeeremie Says:

    Thanks for the info. I didn’t know about this YUI compressed tool. That’s good to know.

    It would be great you create a wordpress plugin. Let us know about it.

  15. 15
    Lawrence Salberg Says:

    Copyright in footer? How can you copyright this? You don’t have rights to standard scripting methods of JavaScript and PHP. Hey, it’s a nice form – don’t get me wrong – but think about how much you’ve been given by the community in terms of free info/advice on forums, and great languages like PHP and JS. To be part of the community, you have to give back. If you are going to “protect” your work, consider a Creative Commons license – which is a lot different than a copyright (which implies that you own all the intellectual property associated with your work – which you don’t).Better yet, just request that people give you credit – you’ll find most will – especially if they can post your Googlicious inbound link to a “credits” page somewhere on their site.Else bundle it up with LTS and charge for it.

  16. 16
    Jeeremie Says:

    Lawrence,

    Did you have a bad day? Where have you seen I put copyright by web-kreation? I say in the footer:
    “© Some Copyrights by their respective authors (if you are not sure visit authors’ websites).”

    This means copyrights by Moo Floor and BadBoy.ro for the PHP and JS.

    I have never pretended I knew any PHP or JS, neither I have intented to create something original. I just wanted to create a nice form using some existing scripts that I liked very much. And since I liked the result, I wanted to share it with others. Is there something wrong with that?

    Moreover, I say on my blog:
    “The CSS, XHTML, PHP and design is released under Creative Commons Attribution v2.5.”

    So next time, before you insult someone, read!!!!

    I am now waiting for your apologies.

  17. 17
    Lawrence Salberg Says:

    Hmmm…. no, not having a bad day. Just thought you didn’t know about that stuff. Turns out you do. Which is great. I first read about the copyright requirement on Smashing Apps here and then saw the same phrase repeated in the Download section above: “Use of this contact form is free of charge but the copyright notes in the footer must remain intact.”So, yeah, I, uh, apologize for not reading further and seeing the license information below. And for everyone’s benefit, the license info is in fact repeated in the actual php script download (not that I looked before).So, now that I apologized, I hope you’ll forgive me. Now, that I see the license info, all I can say is that it is, at best, a bit confusing – or perhaps conflicting information. Even if I had read down to the License section, I’m not sure I would have known which information supersedes which. But, I probably would have left a different comment entirely, admittedly. One asking a question, rather than assuming. You got me – two points for you. Your ball.

  18. 18
    Jeeremie Says:

    Yes, don’t worry. I accept your apologies. That’s not a big deal.

    Cheers!

  19. 19
    Ivo Says:

    its possible add new list menu or drop down menu in your script?whow? i try insert this list menu but i dont see nothing when i try in server!! can you explain me whow to work?thanks

  20. 20
    Quintin Says:

    ack Said:

    “Great. It works smoothly.Firebug detects a slight error on
    the congrats page though:obj has no properties while (obj.offsetParent)
    {on line190 of niceforms.jsKeep up the good work.”I have the same experience. Other than that it all works fine. Thank you for sharing this piece of work.

  21. 21
    ::: Web-Kreation.com ::: Freelance Web Designer Says:

    [...] LightForm is now a Wordpress plugin (only works with latest Wordpress v2.5.1). The plugin is called WP-Lightform and can be downloaded here. Thanks to Alex Rogers for the good work. [...]

  22. 22
    otavio Says:

    CARAAAAAA!!! vc me ajudou muito valeu mesmo. Espero manter contato

  23. 23
    mmartinovich Says:

    Hey! Love your stuff!
    I have a problem… I did everything right and it just won’t send email… it just gives me error…your massage faild to send!
    I can see css, nice form, form check works… it just wont send…

    thx!

  24. 24
    Jeeremie Says:

    @ mmartinovich: The script works fine. I have tried it few times and i could always send mail. Could it be a problem with your server or email address?

  25. 25
    mmartinovich Says:

    Everything is fine on server when I use another script… it sends I get it…
    Seems something is going on with send mail command…I can’t figure it out… everything works smooth except it won’t send…
    Once when I used another script it said ” You are coming from unauthorized domain… could it be something with this thing?

    Can you write down a send mail part of script ’cause I’m not so good with PHP…please! I love this thing! You did awsome job!
    I just HAVE to make it work!

    thx!

  26. 26
    mmartinovich Says:

    Ok… i figuered out why it wouldnt want to send email…
    had to add this line before mail function:
    ini_set(“sendmail_from”, “postmaster@domain.com”);

    Now it works like a charm!
    THX, bro!

  27. 27
    Jose Ramon Says:

    I am using your plugin in a wordpress page and I would like to have two different forms: a contact form and another one.
    I tryed to do that by having two plugins with different names but the same one and change the form in one of them. But the problem is that both appear with the code [lightform].
    Is there a way of having different forms that will show with different code in the posts?

    Thanks.

  28. 28
    Jeeremie Says:

    Jose,
    Do you have a url?

  29. 29
    Jose Ramon Says:

    This is my URL.

    Thanks.

  30. 30
    playmos Says:

    nice job man!
    very useful
    it was not 100% clear to me how text and translations are managed but now i think i’ve got them :)

  31. 31
    Allen Says:

    Hi,

    First, THANK YOU for this awesome contact form.

    Second, is there a way to limit a user’s URL input in the message box to at least 3? Spammers usually sends dozens of them. So I think this would be another good way to avoid spam.

    Thanks again and more power!

    _a

  32. 32
    Allen Says:

    If it’s not possible, is there a way to ban some specific words like ‘viagra’ in the message box?

    I actually tried doing it (please don’t laugh I’m no expert) but only works with one character (like ‘v’ ‘i’ ‘a’ ‘g’ ‘r’ ‘a’) :

    noviagra : /^[^"viagra"]+$/i,

    How to make it so it’s the whole word (“viagra” itself)?

    Thanks!

  33. 33
    mache Says:

    I’m using the wp plugin with your form. it’s working very good!
    just to send you the link to my web, as you asked for it.
    thanks again

  34. 34
    Jeeremie Says:

    Thank you Mache. However, it is Alex rogers you should thank for porting LightForm to Wordpress.

  35. 35
    Alex Says:

    Can someone tell me how I can redirect to a different page instead of going back to the source page?

  36. 36
    Justin Says:

    I’m getting this error:

    Firefox can’t find the file at /Users/laurenyoung/Sites/parsec/LightForm/.

    don’t know why…

    form looks great, I’d like to use it, if i can get this error thing figured out!

  37. 37
    Jeeremie Says:

    @ Alex: Open index.php and go to line 189. Change the message for this:

    <div class=\"MsgSent\">
    <h1>Congratulations!!</h1>
    <p>Thank you <b><?=$name;?></b>, your message is sent!<br /> I will get back to you as soon as possible.</p>
    <script type=\"text/JavaScript\">
    <!--
    setTimeout(\"location.href = \\'http://www.yoursite.com\\';\",5000);
    -->
    </script>
    <p>Please, be patient. You will be redirected to the home page in 5 secondes.</p>
    </div>

    Don’t forget to change “yoursite.com” for your site. The script will redirect the visitor to the new page after 5 secondes.

  38. 38
    Jeeremie Says:

    @ Allen: You should better ask Luca, the author of Formcheck2. But, he is a very busy man. I don’t know if he will have time to answer you.

    @ Justin: no idea. Do you work on your localhost? If so, do you use a software such as EasyPHP?…You should tell us a bit more about your problem if you want someone to be able to help you.

  39. 39
    Justin Says:

    I’m working off my localhost. The error says can’t find file at :

    .

    I just uploaded the files to my server and tried to use it, and this is the error I’m getting.

    Thanks for any advice.

  40. 40
    Jeeremie Says:

    Could you send us the URL? We don’t see your error message.

  41. 41
    Q8iEnG Says:

    Hi, thanks my friend for the script I’ll use it in my other site
    http://www.clickclick.ws

    i’ll release soon the new design of it..

    have a good day :)

  42. 42
    Q8iEnG Says:

    I tried it,, but it give me an error message for failed sending :(

    check it here
    http://clickclick.ws/LightForm/index.php

    please reply to my email :)

  43. 43
    Jeeremie Says:

    This looks like you don’t have a SMTP server installed on your server? You will have to check this with your web hosting company.

    In any case I don’t think it is a problem related to my contact form unless you have screwed up the code. :)

  44. 44
    Q8iEnG Says:

    I didn’t use any of the code!

    just installed it in the site and it is not working!

  45. 45
    Jeeremie Says:

    So did you check if you have an SMTP server?

  46. 46
    Q8iEnG Says:

    I don’t think that it is from the SMTP!!

    because i’m using a script (contact form), that’s work just fine without any problem

    this is it
    http://www.q8ieng.net/mailform/mailform.php

    I’ll contact my support and i’ll let you know :)

  47. 47
    Jeeremie Says:

    Then, I really don’t know. Many people have downloaded this script and no one reported a similar problem. Besides, I have tested this script many times and it works just fine.

  48. 48
    Q8iEnG Says:

    they told me
    Yes, of course. We have SMTP server (EXIM) running on all our hosting servers!!

    so, where did u think the problem is?

  49. 49
    spfc Says:

    I am getting the following errors:

    Notice: Undefined index: name in D:\Sites\www.mydomain.com\form\index.php on line 12

    Notice: Undefined index: email in D:\Sites\www.mydomain.com\form\index.php on line 13

    Notice: Undefined index: website in D:\Sites\\www.mydomain.com\form\index.php on line 14

    Notice: Undefined index: subject in D:\Sites\\www.mydomain.com\form\index.php on line 18

    Notice: Undefined index: message in D:\Sites\\www.mydomain.com\form\index.php on line 27

    Can anyone help me? I didn’t touch anything from the code, just change the email address

  50. 50
    Q8iEnG Says:

    Thanks Jeeremine, I’ll try it :)

  51. 51
    Q8iEnG Says:

    Actually, I did everything, and everything is going alright

    except for the LightForm, I didn’t got how to place that script in it :\

  52. 52
    Meandme Says:

    Great ! But there is a problem with IE explorer 7, when i fill a box, the background image is leaving… just test… if you have a css solution for this, thanks a lot !
    Best regards !

  53. 53
    Jeeremie Says:

    Hello Meandme,

    It works fine for me in IE7. Has someone noticed the same bug in IE7?

  54. 54
    dosntMatter Says:

    Hi Jeeremie :)

    i said before: it works really great but if you disable Javascript, you can do what you want – also sending nothing – it comes the “congratulations Site.
    I have a idea:
    in your example fom lightscript use the tag
    and give a hint that they must activate Javascript
    Else it dont run/work

    If you have a better idea – go ahead

    Greets
    :)

  55. 55
    Xdiz Says:

    Thx very much for this work

  56. 56
    dosntMatter Says:

    Hi Jeeremie

    Here i am again – sorry for double-Posting – sorry for my bad english!

    “in your example fom lightscript use the tag
    and give a hint that they must activate Javascript
    Else it dont run/work”
    in your example from lightscript use the “NOSCRIPT” TAG.

    And: THX for that nice work !!

  57. 57
    Jeeremie Says:

    Hello dosntMatter,

    Actually your comment was posted but when I redesigned this site, I had to move things around and unfortunately, I lost the latest comments and yours as well. Sorry for that.

    I will think about this feature for LightForm but not right now. As you can see, this site is not quite finished yet.

    Thanks anyway for your comment. :)

  58. 58
    Roland Says:

    Hi, i get this IE7 Browser error message in german after sending the form:

    Line: 191
    Sign: 2
    Error: Object necessarily

    After i delete the complete Line 191 in the index.php the error-message was the same. Is there a javascript error?

    Thanks a lot!

  59. 59
    Jason Denison Says:

    Hey Jeeremie,

    Just wanted to say that I’ve searched the web for a very slick looking Contact Us Form that used some PHP, AJAX and JavaScript and your form by leeps and bounds is better than anything I’ve come across. It is freakn’ AWESOME!!! I haven’t installed it yet =) But saw the Demo and looked over the code. So intense!!

    Also thanks for being so detailed and actually taking the time to add comments in. Makes things so MUCH easier on newbies.

    THANKS!!!!!!
    jason

  60. 60
    flashios09 Says:

    Hey Jeeremie,
    your forms works with textinput and textarea but not with select,
    The alert box doesn’t appear when i add a

    Please choose
    Under 10
    Between 10 and 21
    Over 21

    i mean the script doesn’t validate it(select)
    can you help me,
    thanks very much for your work.

  61. 61
    flashios09 Says:

    I’m sorry, i forget to add for the XHTML code
    Hey Jeeremie,
    your forms works with textinput and textarea but not with select,
    The alert box doesn’t appear when i add a

    Please choose
    Under 10
    Between 10 and 21
    Over 21


    i mean the script doesn’t validate it(select) and i think the problem is ‘niceform.js’
    can you help me,
    thanks very much for your work.

  62. 62
    Jeeremie Says:

    Yes, I know. This form was not supposed to be anything else but a contact form.

    When I got some time, I will look into the code and see what I can do. In the meantime, you can visit FormCheck2 and read their documentation. His form validates <select>. I don’t think Niceform.js is the problem.

  63. 63
    flashios09 Says:

    first,thanks !!!!
    i know too,
    just want to say that when i remove the ligns of nices forms
    (i mean niceforms-default.css and niceforms.js)the alert box appear and the form will be validated and it work with ‘Select’ thats why i think nice form.js is the problem
    Note:the link of the documentation of formcheck2 doesn’t work(error 404)
    thanks jeeremie

  64. 64
    Jeeremie Says:

    Thanks for the feedbacks!

    Do you mean the link I put in my latest comment? It works for me.

  65. 65
    ryan Says:

    mmartinovich Says:
    May 25th, 2008 at 6:29 pm

    Ok… i figuered out why it wouldnt want to send email…
    had to add this line before mail function:
    ini_set(”sendmail_from”, “postmaster@domain.com”);

    I’m having the same problem with 1&1 hosting, i keep getting the failed to send error message, yet i couldnt figure out where to put this code and it kept giving me syntax errors

  66. 66
    ryan Says:

    well, a step in the right direction was i got it to post, by replacing all the $_post with $_get. Now it just doesnt acutally post me anything entered in the fields haha

  67. 67
    Wifsimster Says:

    Bonjour,
    Voilà j’ai un petit problème de compréhension au niveau de la condition pour envoyer le message.
    A quoi correspond error-reporting ?

    else{
    error_reporting(0);

    if (mail($to, ...

    Merci d’avance ;)

  68. 68
    wifsimster Says:

    J’ai fais quelques recherches, c’est bon ça marche nickel chrome ;)

  69. 69
    Jeeremie Says:

    Cool!

  70. 70
    Dave Says:

    Hi Jeeremie,
    Thanks for this nice form.
    I’ve got a question. I was trying to setup this form on a website and want to test it with my email in it. Wich is not from the same domain. The website is for instance: http://www.mydomain.com and my email is… the one i filled in this form. When i send a test message, i don’t receive any email. When i put your form on my own domain. I do receive the message. Why is it not possible to use an email with a different domain in it?
    Or is it something else whats causing this issue?

    Hope to hear from you as im trying to get the website online by tomorrow :)

    Thanks,
    Dave.

  71. 71
    Dave Says:

    Ow… and yes… i also noticed in IE7 that when i type a large value of text in the message field, that the background is moving/scrolling up.

  72. 72
    Jeeremie Says:

    I have no idea Dave. You should contact your host. It might be a problem concerning your remote mail server and in that case, only them can help you.

    About the message you sent by mail:

    550-Response: 550-You do not have sufficient privileges
    to send mail to this address.  Please
        550-550 authenticate and try again.
        550 Sender verify failed

    … here’s what I find on Google:

    This problem is caused in case your SMTP server doesn’t support sending of mails with local host identified as localhost.
    It requires, that computer, which is sending mail, has to be identified by real domain/host name.

    I don’t know if it helps.

  73. 73
    Jeeremie Says:

    Ow… and yes… i also noticed in IE7 that when i type a large value of text in the message field, that the background is moving/scrolling up.

    Open index.php and add the following conditional comment into the <head> section:

    ?View Code HTML4STRICT
    <head>
    ...
    <!--[if IE]>
    <style type="text/css">
    /*<![CDATA[*/
    .textinput, .textinputHovered {
    	background-attachment: fixed;
    }
    /*]]>*/
    <![endif]-->
    </head>

    This code will be only be read by Internet explorer and will be ignored by other browsers.

  74. 74
    Dave Says:

    I had contact with the host company.
    They said, that the php script is using SMTP maling via PHP, wich is not allowed. Not to a remote domain, but only local. They advised me to change the script so it runs by ’sendmail’ over PHP.
    The hosting company did this kinda protecting against spam by bots from the internet.

    Is it possible that you could change this? I really have no clue if it’s a lot of work. If it’s a lot of work for you, please contact me by mail. I would pay you for a sollution with this one.
    At the moment i havent found a decent mail script that works on this server.

    Thank you, please let me know.

    Dave

  75. 75
    Jeeremie Says:

    Dave, I can’t change the script in just five min. It is impossible. I would have to rewrite a good part of the code and I don’t have time for that. Read some documentation online about sendmail. I don’t think it would be very complicated to change code.

  76. 76
    Thiyagarajan.G Says:

    Thanks for this nice form. It is working very nice…

  77. 77
    Danielm Says:

    It doesn’t work togehter with mootools slimbox (http://www.digitalia.be/software/slimbox), because your lightform only uses the old version of mootools (current version is 1.2) :-(

  78. 78
    charlie Says:

    the first 4 fields won’t show up under IE7.
    anybody has this problem?

  79. 79
    denbagus Says:

    how change in Code Igniter Framework environment ?

  80. 80
    denbagus Says:

    and how to make random question every refresh the page ?
    so not only “2+3″ but can make another “2+3″

  81. 81
    Justin Fleming Says:

    Problem with the error popups is that they get their location from the size/layout of the form.

    If you put the form inside a scrolling div (overflow:auto), the error messages appear in the wrong place, since they appear where the input boxes *were* on page load before scrolling.

    Any fix for this? Thanks.

  82. 82
    Justin Fleming Says:

    Oh and yes, doesn’t work under IE7 (first 3 fields are not styled – input boxes are there and function, but are invisible and without graphics)

  83. 83
    kixass Says:

    for a fucking contact form you need 3 directories and fucking 100 files + housewife mootools. FTS everbody who is using this is a girl. inability. gayness.

  84. 84
    Jeeremie Says:

    There’s no need to be rude Kixass. That was just an experiment I have done. If you think you can do better, then do it! We will all be glad to use your script then.

  85. 85
    ordersomabuyg Says:

    Wow Cool !
    Super Man
    Nice Site

  86. 86
    Q8iEnG Says:

    Hi Jeeremie, :)

    please I’m using this script it is awesome

    but there’s something if you could help me doing it, i’ll be more appreciated :)

    the anti-spam question, please can you give me edited code for CAPTCHA re-generating image, instead of the question for anti-spam?

    please, I do really receive more than 20 emails a day!

    let me know, i’ll be much more appreciated ^_^

    and yeah don’t care about KIXASS he’s really jealous :D *I guess*

    waiting you mate :)

  87. 87
    Jeeremie Says:

    I don’t have time to look into this. Try searching on google some captcha scripts. There’re tons of them out there.

  88. 88
    Q8iEnG Says:

    Ok mate sorry for disturbing

    as you like :)

  89. 89
    Q8iEnG Says:

    As an appreciation :)

    I did inserted the Captcha
    Demo:
    http://www.q8ieng.com/mailform/mailform.php

    if you want to put this modified version, here’s the link
    Download:
    http://www.2shared.com/file/4004921/1a25e5f8/mailform.html

    Enjoy ^_^

  90. 90
    Jeeremie Says:

    Thanks Q8iEnG! Very nice!

  91. 91
    Q8iEnG Says:

    No problem, this is the way how to thank you for the nice script ^_^

    have a great day

  92. 92
    Ricardo Patino Says:

    Very nice clean code and appearance.

    This is my wife’s site. We are just uploading content, soon will be ready to launch.

    Thought you would like to know that your form works beautifully in shadowbox – but you probably know that already.

    Your form is exactly what i was looking for.

    Thanks a million!

  93. 93
    Jeeremie Says:

    @Ricardo,

    Actually, I have never seen LightForm in a Lightbox clone. Looks really nice.

    Good luck with your site. It looks really good at the moment.

  94. 94
    Greg Says:

    Hi

    I am using the MooTools login form you made here (http://web-kreation.com/index.php/tutorials/nice-login-and-signup-panel-using-mootools-12/).

    On the same page I am also trying to implement this contact form, however..

    The javascript from this and the styles from this interfere with each other. The Javascript stops the login panel sliding up and down and the style changes the input form for the login panel.

    Any ideas? Please use my email address to reply. Thanks :)

  95. 95
    Greg Says:

    The form highlighting doesnt work in Internet Explorer either :(

  96. 96
    Jeeremie Says:

    @Greg: Lightform works with Mootools 1.1 and the login panel with Mootools 1.2. That’s why the two scripts don’t work together.

    The form highlighting doesnt work in Internet Explorer either :(

    Yes, that is a known bug. I never had time to fix it. I will try to have a look at it asap.

  97. 97
    Greg Says:

    I managed to get the login panel and the lightform to work together by adding an iframe

  98. 98
    Ricardo Patino Says:

    Jeremy
    I need Help! The input fields in the contact form aren’t showing on ie7 – any idea? (they show fine on firefox)

  99. 99
    Greg Says:

    Did you just not read the 2 posts above you?

  100. 100
    Jeeremie Says:

    Ricardo, I have fixed it. It now works in IE6+. I only had to removed the code below line 118 in index.php to make it work properly:

    <!--[if IE]>
    <style type="text/css">
    /*<![CDATA[*/
    .textinput, .textinputHovered {
    	background-attachment: fixed;
    }
    /*]]>*/
    <![endif]-->

    However, I have improved LightForm a little bit and updated it with the Niceform v1.0 so it is better if you download the new version (v1.1) in the post above. Cheers!

  101. 101
    Jacob Says:

    Hi! I am having some problems to get it working properly. It works until I press the send button, then I only get a 404 with this added in the url:

    Any suggestions? :)

  102. 102
    Jacob Says:

    missed to input the code:

  103. 103
    Kiz Oyunlari Says:

    Thanks. Good job.

  104. 104
    Silent Radar Says:

    I installed the form and it work but there major issues with images. I don’t get the rounded corners and it makes the boxes look like the ends are missing. Also the js somehow killed my jquery nav bar. Maybe I have the js in the wrong places and that is causing the problem. The js I can sort out later but right now I am concered about the images looking right.

    Thanks for any help

  105. 105
    Jeeremie Says:

    jQuery and Mootools are two different JS frameworks and can’t work together on the same Web page. You have to choose one or the other.

  106. 106
    Sean Says:

    how do i remove the “Website” form and add a text field for “Phone number”? or simply change it to that? – Sorry, new to php.

  107. 107
    Jeeremie Says:

    Open index.php and go to line 61:

    $website = stripslashes($_POST['website']); //sender's website

    and modify the code as so:

    $phone = stripslashes($_POST['phone']); //sender's phone number

    Now, go to line 73 and replace this line:

    $msg .= "Website : $website \r\n";

    … by this one:

    $msg .= "Phone Number : $phone \r\n";

    Go to line 138:

    ?View Code HTML4STRICT
    <!-- Website -->
    <label for="site">Website : </label>
    <input id="website" name="website" type="text" class="validate['url']" size="20" />

    Modify it as shown below:

    ?View Code HTML4STRICT
    <!-- Phone Number -->
    <label for="phone">Phone : </label>
    <input id="phone" name="phone" type="text" class="validate['required','number','length[3,-1]']" size="20" />

    You don’t need to put ‘required’ if this field is optional.

  108. 108
    Sean Says:

    thank you so much for your fast response.. its working great :)

  109. 109
    Sean Says:

    One more thing, I’m trying to change the “Thank you!” text on the message sent page along with the check mark color and the submit button color to green 62C14F so i can keep a consistent color pattern with the site I’m building. The rest of the text on the sent page white FFFFFF, and the white background behind it all to be black. I realize that a lot of this is editing the .gif files included, but when i try to do it in photoshop, they’re locked and will not let me edit or even unlock them. Maybe I’m missing something here… Sorry for the newb questions about this.

  110. 110
    padZtar Says:

    Hi Jeeremie,
    Id like to start by thanking you for compiling this Brilliant Contact form. It looks and works nicely.

    However, I am trying very hard to add some required text fields to the form which will then be carried through to the Email that is delivered. At the moment I have added all of the text fields that are required and have ammended the code as suggested, but simply cant work out how to get all of the fields to appear in the email that is sent??? Its driving me bonkers!!

    My testing page can be found HERE… Id be eternally greatful if you or somebody could take a look and let me know where im going wrong…

    Hope you can help,
    padz :)

  111. 111
    Jason Says:

    Like everyone else here, I love love love the script. THANK YOU!

    Quick question though: Is anyone having issues in Safari? I have it working just fine in IE and FF, but Safari just gives me the perpetual loading signal.

    Let me know if you need to see the code.

  112. 112
    ktsixit Says:

    nice script, but you should also have a clear css version for downloading. Without styling, images and css styles. Just the code people actually need. It takes a lot of time to make the changes I wnat, There’s no need to do all this.

  113. 113
    Jeeremie Says:

    Ktsixit, you got a good point. It is something I will try to keep in mind next time I update this script. Thanks!

  114. 114
    Rayinnyc Says:

    Nice form. I Want to add a selection box with different departments and different email addresses for each department which the user will pick. I’m new to php sorry! Any help would be appreciated.

  115. 115
    Billigflüge Says:

    Nice! I´ve got updatet the script, and it´s working beautifully!!!!
    Thx alot, greets

  116. 116
    Accelra Says:

    Hi there,

    I was wondering if anyone had the altered code that Q8iEnG did that put a Captcha into the form as his download link is offline?

    Any help would be much appreciated.

    Thanks

  117. 117
    Fabio Says:

    first of all, many, many, many thanks for this super useful implementation, and, quite obviously, a request: can you show me the code to insert a checkbox? i tried in many ways, but can’t get to make it work.
    again, mate, many thanks!

  118. 118
    byila Says:

    THANK YOU for this awesome contact form…

  119. 119
    pertrai1 Says:

    Could you give me a quick working example of how to use checkboxes with this please. Thank you.

  120. 120
    sama creation Says:

    hi
    tanks for the contact form
    i have a problem my Host server dont allow the funtion “mail”
    so i must use SMTP and enter my user and passe to make it woks

    can you give me a version Of light Form using SMTP tanks so much

  121. 121
    Oliver Melton Says:

    Anyway to execute this form without a de facto page refresh?

    I’m trying to embed it in a Spry panel, and everything works great except that when I click submit, it reload the page and sends the user back to the first tab.

    At the very least, it would be great if I could identify a specific tab (I can do this using a URL, ex. http://www.example.com/index.php?panel=5) to be shown after the script executes.

    Great form; any suggestions would be much appreciated.

  122. 122
    Oliver Melton Says:

    PS, the validation doesn’t seem to work when embedded in the panel either. Just FYI.

  123. 123
    Jeeremie Says:

    This can be done with AJAX. Nettuts has an excellent article on the subject but you will have to rewrite most of the script.

    Otherwise, it must be possible to identify a specific tab as you suggest but I have no idea how.

  124. 124
    Accelra Says:

    Hi there,

    Has anyone got a version of this form with a captcha code generator.

    Or has anyone got one the above with a captch set up.

    Cheers for any help.

  125. 125
    Oliver Melton Says:

    Here’s something I found that might do the trick. I’ve not had time to experiment yet, but I will.

    :: http://cates-associates.net/tutorials/Tutorial-CS3-forms.html

  126. 126
    Andrey Says:

    Hi Jeeremie! Tell to me how to make that after pressing “Send it” the message on successful sending on the same page where also the form emerged, instead of the new page opened. Thanks.

  127. 127
    Oliver Melton Says:

    @ Andrey

    I think that’s essentially my question as well.

  128. 128
    prawin Says:

    HI jeermie,
    Ihave tried ur coding,  But unfortunately it doesnt works , i got the error as
    Parse error: syntax error, unexpected T_IF in c:\wamp\www\prawin\new\ajax\new1\index.php on line 31

    ie is in index .php
    30.    <? php
    31.     if ($_SERVER['REQUEST_METHOD'] != ‘POST’){
    32      $self = $_SERVER['PHP_SELF'];
    33.     ?>
    kindly tell me where i went wrong

  129. 129
    Ella Says:

    The script works GREAT. Thank you so much! :)

  130. 130
    Ivonne Says:

    The script is perfect I updatet it and it is working perfect!!!!
    Thanks a lot!!!!

  131. 131
    Kral Oyun Says:

    Can someone tell me how I can redirect to a different page instead of going back to the source page?

  132. 132
    Pre Says:

    I’m having issues with the from. The text field bg image won’t display with the validate class. How do I correct this?

  133. 133
    Matt Rittman Says:

    Is it possible to use FormCheck on a regular PHP contact form?

  134. 134
    Jeeremie Says:

    Yes, you can. It is what I did to build LightForm. Check the official FormCheck page for usage.

  135. 135
    Matt Rittman Says:

    I’m still a bit confused on what MooTools is…

    I downloaded formcheck and put the .js files on my web server. Then I added the javascript code to the top of my php page. I added the class to one of the input boxes on my form but it didn’t do anything at all when I tested it out. Am I doing something wrong?

  136. 136
    Juju Says:

    Hello,
    Sorry, i’m french and i don’t speak english very well.

    I would like to know how to accept the accents in the form, because when I receive the email, I like this character “Ã ©”, “è” …

    Thanks a lot, this form is super !!

    Juju

  137. 137
    Jeeremie Says:

    Pas de problème. You must change the charset in the <HEAD> section of your document:

    ?View Code HTML4STRICT
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    For french alphabet, I think you need to use charset=iso-8859-1 (Western Alphabet ) if I remember well. If it doesn’t work, have a loot at this list. charset=iso-8859-2 should work as well.

  138. 138
    Juju Says:

    Sorry it’s ok.
    Problem was that i used joomla ;)

    Thank you very much ;)

  139. 139
    120+ Javascript, Ajax, jQuery Mega Toolbox | tripwire magazine Says:

    [...] LightForm – Ajax / PHP Contact Form [...]

  140. 140
    Rock7 Says:

    I’ve installed the code into an existing contact us page. Everything works fine except the Tipbox’s are appearing in my page background and are getting cut off by the page body.

  141. 141
    Marco van Dam Says:

    Hello,

    The lightform script is really great!!!

    But i have still one question…

    How can i mail the form as a HTML mail?
    I tryd, but can’t get it too work…

    Hope you can help me :-)

  142. 142
    Marco van Dam Says:

    This form is super!!

    But the form send the information in plain text, can i send the form info also in html mail?

  143. 143
    25+ jQuery Plugins that enhance and beautify HTML form elements « Online Free Application Software Tips Tools Wallpapers Says:

    [...] Lightform [...]

  144. 144
    یک طراح وب » معرفی 5 فرم تماس ِ رایگان ِ ای جکس Says:

    [...] فرم تماس LightForm – نمایش [...]

  145. 145
    25+ jQuery Plugins that enhance and beautify HTML form elements « Dogfeeds——IT Telescope Says:

    [...] Lightform [...]

  146. 146
    LightForm - WebDev3000 Says:

    [...] of code that seems to have reached the end of its days, unfortunately. Well, the good part is that LightForm is still a very useful piece of code, and so I hope it won’t fall into oblivion anytime [...]

  147. 147
    150 Worth Knowing Web Developer Tools and Techniques | tripwire magazine Says:

    [...] LightForm – Ajax / PHP Contact Form [...]

  148. 148
    16 Free Ajax Contact Forms – For A Better User Experience-NotFailed Says:

    [...] LightForm – Ajax / PHP Contact Form – Demo [...]

  149. 149
    eagrapho » 35 Must Know AJAX Tutorials, Techniques and Resources Says:

    [...] LightForm It uses FormCheck2 for validation of fields and NiceForms to style form objects. [...]