7
Feb
2008
LightForm ::: Free Ajax/PHP Contact Form
By jeeremie. Posted in AJAX / Javascript, Articles, PHPLightForm 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:
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.
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:
- Download and unzip the file
- 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.
Popularity: 50% [?]



February 7th, 2008 at 11:01 pm
[...] A new default theme is avalaible (thanks to Jeremie!) [...]
March 7th, 2008 at 1:32 pm
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.
March 18th, 2008 at 3:56 pm
It looks beautiful!Good work!I’ve translated it a little to Simple Chinese.You can visit it here.
March 25th, 2008 at 4:02 am
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.
March 25th, 2008 at 10:50 am
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.
March 26th, 2008 at 2:57 am
Hi Jeeremie, that was easy to change, thanks for your help.
April 22nd, 2008 at 8:37 am
I wanted to know how could I add some radio and checkboxs to my form, because they don’t appear…Thank a lot!
April 22nd, 2008 at 10:44 am
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.
April 22nd, 2008 at 10:49 pm
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 ^^…
April 24th, 2008 at 9:12 pm
IS it easy to add more fields?
April 25th, 2008 at 10:10 am
Very nice! how can i put this form into my About page in Wordpress?Thanks!
April 25th, 2008 at 10:40 am
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</span>“, 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
May 1st, 2008 at 7:02 am
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
May 1st, 2008 at 11:04 am
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.
May 8th, 2008 at 10:15 pm
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.
May 8th, 2008 at 10:48 pm
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.
May 8th, 2008 at 11:39 pm
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.
May 9th, 2008 at 11:35 am
Yes, don’t worry. I accept your apologies. That’s not a big deal.
Cheers!
May 14th, 2008 at 1:35 am
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
May 14th, 2008 at 4:27 pm
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.
May 17th, 2008 at 10:39 am
[...] 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. [...]
May 21st, 2008 at 1:47 pm
CARAAAAAA!!! vc me ajudou muito valeu mesmo. Espero manter contato
May 24th, 2008 at 2:38 am
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!
May 24th, 2008 at 11:39 am
@ 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?
May 24th, 2008 at 4:44 pm
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!
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”);
Now it works like a charm!
THX, bro!
May 27th, 2008 at 11:16 am
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.
May 27th, 2008 at 11:35 am
Jose,
Do you have a url?
May 28th, 2008 at 1:15 pm
This is my URL.
Thanks.
May 29th, 2008 at 4:59 pm
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
May 29th, 2008 at 7:19 pm
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
May 29th, 2008 at 10:22 pm
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!
May 30th, 2008 at 6:50 am
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
May 30th, 2008 at 9:58 am
Thank you Mache. However, it is Alex rogers you should thank for porting LightForm to Wordpress.
June 4th, 2008 at 6:21 am
Can someone tell me how I can redirect to a different page instead of going back to the source page?
June 4th, 2008 at 4:28 pm
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!
June 4th, 2008 at 5:32 pm
@ 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.
June 4th, 2008 at 5:48 pm
@ 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.
June 4th, 2008 at 6:41 pm
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.
June 4th, 2008 at 6:50 pm
Could you send us the URL? We don’t see your error message.
June 9th, 2008 at 2:23 pm
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
June 9th, 2008 at 3:40 pm
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
June 9th, 2008 at 3:50 pm
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.
June 10th, 2008 at 11:37 am
I didn’t use any of the code!
just installed it in the site and it is not working!
June 10th, 2008 at 11:49 am
So did you check if you have an SMTP server?
June 10th, 2008 at 8:38 pm
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
June 10th, 2008 at 8:47 pm
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.
June 10th, 2008 at 9:57 pm
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?
June 18th, 2008 at 4:40 pm
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
June 19th, 2008 at 4:37 pm
Thanks Jeeremine, I’ll try it
June 25th, 2008 at 4:38 pm
Actually, I did everything, and everything is going alright
except for the LightForm, I didn’t got how to place that script in it :\
July 12th, 2008 at 3:55 pm
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 !
July 12th, 2008 at 4:10 pm
Hello Meandme,
It works fine for me in IE7. Has someone noticed the same bug in IE7?
July 12th, 2008 at 4:15 pm
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
July 13th, 2008 at 1:50 pm
Thx very much for this work
July 14th, 2008 at 10:47 pm
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 !!
July 15th, 2008 at 8:19 am
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.
July 18th, 2008 at 7:02 am
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!
July 20th, 2008 at 3:00 pm
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
August 6th, 2008 at 12:17 pm
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.
August 6th, 2008 at 12:24 pm
I’m sorry, i forget to add
for the XHTML codeHey 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.
August 6th, 2008 at 12:30 pm
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.
August 6th, 2008 at 1:49 pm
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
August 6th, 2008 at 3:19 pm
Thanks for the feedbacks!
Do you mean the link I put in my latest comment? It works for me.
August 8th, 2008 at 6:57 pm
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
August 8th, 2008 at 11:41 pm
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
August 12th, 2008 at 12:25 pm
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
August 12th, 2008 at 5:48 pm
J’ai fais quelques recherches, c’est bon ça marche nickel chrome
August 12th, 2008 at 6:44 pm
Cool!
August 13th, 2008 at 12:55 am
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.
August 13th, 2008 at 12:58 am
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.
August 13th, 2008 at 9:47 am
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:
I don’t know if it helps.
August 13th, 2008 at 9:49 am
Open index.php and add the following conditional comment into the <head> section:
This code will be only be read by Internet explorer and will be ignored by other browsers.
August 13th, 2008 at 10:25 am
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
August 13th, 2008 at 10:35 am
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.
August 29th, 2008 at 6:00 am
Thanks for this nice form. It is working very nice…
September 3rd, 2008 at 4:34 pm
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)
September 12th, 2008 at 3:40 am
the first 4 fields won’t show up under IE7.
anybody has this problem?
September 14th, 2008 at 6:46 am
how change in Code Igniter Framework environment ?
September 14th, 2008 at 6:49 am
and how to make random question every refresh the page ?
so not only “2+3″ but can make another “2+3″
September 14th, 2008 at 9:20 pm
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.
September 14th, 2008 at 9:23 pm
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)
September 19th, 2008 at 12:10 pm
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.
September 19th, 2008 at 12:13 pm
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.
September 21st, 2008 at 7:42 pm
Wow Cool !
Super Man
Nice Site
September 25th, 2008 at 12:26 pm
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
*I guess*
waiting you mate
September 25th, 2008 at 5:24 pm
I don’t have time to look into this. Try searching on google some captcha scripts. There’re tons of them out there.
September 25th, 2008 at 5:53 pm
Ok mate sorry for disturbing
as you like
September 28th, 2008 at 2:11 pm
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 ^_^
September 28th, 2008 at 9:00 pm
Thanks Q8iEnG! Very nice!
September 28th, 2008 at 9:14 pm
No problem, this is the way how to thank you for the nice script ^_^
have a great day
September 30th, 2008 at 6:41 am
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!
September 30th, 2008 at 8:38 am
@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.
October 3rd, 2008 at 2:08 pm
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
October 3rd, 2008 at 3:02 pm
The form highlighting doesnt work in Internet Explorer either
October 4th, 2008 at 9:12 am
@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.
Yes, that is a known bug. I never had time to fix it. I will try to have a look at it asap.
October 4th, 2008 at 9:26 am
I managed to get the login panel and the lightform to work together by adding an iframe
October 8th, 2008 at 3:52 am
Jeremy
I need Help! The input fields in the contact form aren’t showing on ie7 – any idea? (they show fine on firefox)
October 8th, 2008 at 9:51 am
Did you just not read the 2 posts above you?
October 9th, 2008 at 2:15 pm
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:
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!
October 14th, 2008 at 6:54 pm
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?
October 14th, 2008 at 7:05 pm
missed to input the code:
October 26th, 2008 at 4:43 pm
Thanks. Good job.
October 29th, 2008 at 4:56 am
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
October 29th, 2008 at 9:03 am
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.
November 11th, 2008 at 9:35 am
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.
November 11th, 2008 at 10:38 am
Open index.php and go to line 61:
and modify the code as so:
Now, go to line 73 and replace this line:
… by this one:
Go to line 138:
Modify it as shown below:
You don’t need to put ‘required’ if this field is optional.
November 12th, 2008 at 6:32 am
thank you so much for your fast response.. its working great
November 12th, 2008 at 8:16 am
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.
November 19th, 2008 at 8:43 pm
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
November 20th, 2008 at 10:02 am
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.
November 20th, 2008 at 12:45 pm
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.
November 20th, 2008 at 12:52 pm
Ktsixit, you got a good point. It is something I will try to keep in mind next time I update this script. Thanks!
November 22nd, 2008 at 2:39 am
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.
December 15th, 2008 at 4:32 pm
Nice! I´ve got updatet the script, and it´s working beautifully!!!!
Thx alot, greets
December 16th, 2008 at 10:15 am
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
December 18th, 2008 at 8:21 pm
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!
December 26th, 2008 at 3:37 pm
THANK YOU for this awesome contact form…
December 30th, 2008 at 4:25 pm
Could you give me a quick working example of how to use checkboxes with this please. Thank you.
January 22nd, 2009 at 4:32 am
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
January 27th, 2009 at 4:10 pm
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.
January 27th, 2009 at 4:11 pm
PS, the validation doesn’t seem to work when embedded in the panel either. Just FYI.
January 27th, 2009 at 8:19 pm
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.
January 28th, 2009 at 11:31 pm
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.
January 30th, 2009 at 2:04 pm
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
February 1st, 2009 at 2:31 am
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.
February 2nd, 2009 at 5:49 am
@ Andrey
I think that’s essentially my question as well.
February 5th, 2009 at 7:17 pm
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
February 17th, 2009 at 9:34 pm
The script works GREAT. Thank you so much!
February 18th, 2009 at 6:54 pm
The script is perfect I updatet it and it is working perfect!!!!
Thanks a lot!!!!
March 19th, 2009 at 9:29 pm
Can someone tell me how I can redirect to a different page instead of going back to the source page?
March 24th, 2009 at 5:27 am
I’m having issues with the from. The text field bg image won’t display with the validate class. How do I correct this?
March 26th, 2009 at 2:15 pm
Is it possible to use FormCheck on a regular PHP contact form?
March 26th, 2009 at 2:21 pm
Yes, you can. It is what I did to build LightForm. Check the official FormCheck page for usage.
March 26th, 2009 at 2:31 pm
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?
April 1st, 2009 at 3:40 am
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
April 1st, 2009 at 8:18 am
Pas de problème. You must change the charset in the <HEAD> section of your document:
<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.
April 2nd, 2009 at 2:48 am
Sorry it’s ok.
Problem was that i used joomla
Thank you very much
April 11th, 2009 at 5:43 am
[...] LightForm – Ajax / PHP Contact Form [...]
April 19th, 2009 at 12:54 pm
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.
April 20th, 2009 at 9:31 pm
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
April 21st, 2009 at 4:24 pm
This form is super!!
But the form send the information in plain text, can i send the form info also in html mail?
May 18th, 2009 at 10:19 pm
[...] Lightform [...]
May 30th, 2009 at 9:49 pm
[...] فرم تماس LightForm – نمایش [...]
June 13th, 2009 at 8:56 pm
[...] Lightform [...]
June 24th, 2009 at 4:45 pm
[...] 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 [...]
July 5th, 2009 at 4:04 am
[...] LightForm – Ajax / PHP Contact Form [...]
July 22nd, 2009 at 9:15 pm
[...] LightForm – Ajax / PHP Contact Form – Demo [...]
January 14th, 2010 at 7:56 pm
[...] LightForm It uses FormCheck2 for validation of fields and NiceForms to style form objects. [...]