I have a problem with it.
Warning: Cannot modify header information - headers already sent by (output started at E:\www\contactform\index.php:2) in E:\www\contactform\scripts\bb\bad-behavior\screener.inc.php on line 8
Note: This post is over 2 years old. You may want to check later in this blog to see if there is new information.
The following links are auto-generated but may help you locate newer content:
I’ve gotten enough requests for the contact form code that I’ve finally gotten around to cleaning up the code a little bit. I guess I figured that after I finally got CRE Loaded to play nice, I could afford an hour to make things look prettier for all the folks that were trying to step through my mess. So I’m officially releasing a beta package of my code. It’s got credited comments and a README file, basic instructions and the whole shebang of scripts, form and CSS files. You still need basic PHP, javascript and XHTML skills to pull it off, but I made learning AJAX just a little simpler, I hope. Of course, I have to give props to Dustin Diaz again, who made it simple for me. I suppose, ultimately, I just re-complicated things. Yes, that’s really all this is. But let me reiterate: It’s secure, it’s cross-platform, it’s pretty, it’s modular, it’s degradable and it’s AJAXified.
The official beta release of the over-the-top contact form:
see it here | download it here.
I have a problem with it.
Warning: Cannot modify header information - headers already sent by (output started at E:\www\contactform\index.php:2) in E:\www\contactform\scripts\bb\bad-behavior\screener.inc.php on line 8
Are you offering some support for this form? I’ve got it to work, it sends ok… but it doesn’t include the message.
see at: onemanshortproductions.com/community.php
everything sends correctly… but it won’t send me what is inside the mail message box.
in any of those emails you sent… it didn’t send the message…
Website Contact: Testing without javascript Inbox
Brett
to me
More options 2:31 pm (1 hour ago)
website:
Host: onemanshortproductions.com
Is it possible to turn off the “OK” and “X” mechanism as well as the astricks. I still want to check that the fields are filled in and the email to validate just no symbols to the left of the field names.
All of the icons on the side can be controlled with the CSS. Just remove the padding and background image for the different “states” (alert, error, etc.) and they’ll disappear.
Brett,
Thanks for releasing the code for the “Ajaxified” Contact Form. I have been messing around with it for a bit and it seems flexible and easily configurable.
I do have one question that I am hoping you can provide some insight into for me. I am having issues with retrieving the correct values for “checkbox” inputs. It reads them into the form and the subsequent email message but they always contain the default values I specify regardless of whether they are “checked” or not.
How would I designate the correct values when they are selected? I searched for a class (similar to ‘other’) in the code that I could apply to the input but I was unable to see one I could use. I hope I am making sense. In any case,
Thanks again for your help and fine release - Brandon
I’ll have to dig into the code, it’s been a while. I know that I never explicitly created options for checkboxes, but that there was some legacy code in there for handling them. I’ll take a look at it and email you when I figure it out. Brett
Brett,
Thanks again for your rapid response. I did see how Dagon (http://www.dagondesign.com) was doing it in his original script but I understand you modded it heavily for use in your form.
Take care - Brandon
Yeah, I actually talked to Mr. Dagon. He didn’t press legal charges ;-).
Here’s what you need to do… it’s a further hack, I need to rewrite the whole thing at some point.
Find the line in validate.js around line 719:
var value = cleanString(el.value);
and replace it with:
if (el.type==’checkbox’) {
var value = el.checked;
} else {
var value = cleanString(el.value);
}
The problem is that when it picks up the values with classes set to “other”, it only looks at their values, and a checkbox has a property called “checked” that determines whether it is true or false. With this code you should get the name of your check box followed by a true or false in your message. Brett
Brett,
Thanks - That worked like a charm. For some reason, I did not explore the actual “send” function in validate.js. I may still have not located the issue though without you pointing me in the correct direction - ha …
Thanks again - Brandon
Is there a way to get the messge field to clear, as the other fields do, upon submission?
I’ve had different fields stick in different browsers. I can play around with it some more, but if you happen to figure it out, I’ll give you a medal of commendation… figuratively, of course. I’m spending most of my free time in Ruby these days and my javascript is getting rustier by the hour.
It should be a simple DOM value change, so I’ll take a look at it, but I know it was a bug I couldn’t track down a few months ago. Maybe I’ll have better luck this time ;-).
Comments are closed
Comments are currently closed on this entry.