Contact Form Broken

Greetings Good Folks,

I’m really lost and hope you can find me.

I just found out from a client who telephoned me that my website’s contact form is not working. When I tried to send myself a test contact the massage returned was “This can not be accessed this way, you need to have an input field named ‘sendtoemail’”.

The form has been working for years and I have made no changes I’m aware of. There is, in fact, an input field named ‘sendtoemail’ present:

            <input type="hidden" name="sendtoemail" value=""/>
            <input type="hidden" name="subject" value="Repair Inquiry"/>

I put the page through W3C’s validator and checked every error. The last two errors stood out because they referred to markup I never wrote and is not present in the page when opened with an editor. It is, however present when the markup is viewed through a browser’s ‘View Page Source’ tool. As far as I can tell, some sort of script has been inserted where my email address should be referenced and at the body’s end.

This really threw me for a loop. Not knowing what to think, I’m thinking the worst - that someone is trying to highjack my emails.

Here’s the page:

What is going on?

Try wrapping the two hidden fields in fieldset tags, like the validator says to.

            <input type="hidden" name="sendtoemail" value=""/>
            <input type="hidden" name="subject" value="Repair Inquiry"/>

If you haven’t made any changes then it’s also worth contacting your hosting company. They might have changed something on the server which causes the form to fail.
I had something similar a couple of weeks ago and the hosting company had installed new antivirus software on the server which broke the admin panel of my site!

The Validator is saying that those input tags are invalid

Line 191,
Column 92:
document type does not allow element “input” here;
missing one of “p”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “div”, “pre”,
“address”, “fieldset”, “ins”, “del” start-tag
<input type = "hidden" name = "sendtoemail" value = ""/>

Quite simple, if code is not valid, don’t expect it to work.
Adding the fieldset tags makes them valid.
If that does not fix it, I would check with, who appear to be hosting the mail processor, from the action attribute.
Also worth mentioning, it does not seem a very affective from system, as your email address is there in the form, quite visible to spam-bots.

Thanks for your feedback good folks. The <fieldset> </fieldset> suggestion makes sense, even though the form has been working all this time without it. I’ve made the change to no avail. Now I’m waiting to hear back from my hosting company.

Will keep you posted.

In the meantime I’m still wondering about the ‘ghost’ javascript. I wonder if it’s not a side effect of the “View Page Source” tool. Something to throw the spam bots maybe?

Javascript can add code to the html output the browser sees. When you load the file in your editor, you see the code for the script, but the browser will see the result of the script which may call up more code from elsewhere.

The thing is that I did not add javascript to this page. The script at the bottom of the page is not mine


So whether this creates further markup or not is almost beside the point. The script is not mine.

By the way, after several communications with my provider i finally got a straight answer. Their webmai is broken.

Previous to this they twice told me my contact form was working just fine and another time said something about an unsupported contact form. Before that I had a long chatmail which resulted in them throwing their hands up.

I normally tend to refrain from criticism, but I think Hostmonster has earned my disdain, and I want to take this opportunity to warn others of their shortcomings. I recently renewed my subscription/membership for the next three years and I now regret it.

Do not trust Hostmonster.

Those 2 blocks of JavaScript look to be for the “[email protected]”
That is, with JavaScript enabled, the string “[email protected]” is changed into the email address.
Without JavaScript enabled (this is assuming search bots and scraper scripts won’t have it enabled) the link points to

Check the page both with and without JavaScript enabled and you’ll see the difference.

Neither of the 2 JavaScript tags below the form tags have anything to do with the contact form as far as I can see.

I’m sure you’re right Mittineague. Thanks.

After more than a month with no contact form and many, many discussions with Hostmonster, it’s become clear that they are not going to be of any help to me. They have fumbled, stumbled and have been downright rude to me.

I’ve decided to take things into my own hands and learn PHP.

Thank you all for your efforts.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.