View Full Version : Help with user Forms

03-05-2005, 01:07 PM
I have created a form and, up to yet, so far so good. But when i tested it, i clicked submit and it did not send. Any help would be greatly appreciated. The code is below, as is the website. Thanks.
<FORM action="http://www.freewebs.com/binfreshcleaningservices/main.htm" method=post>
<input type=hidden name="userid" value="10679505">
<input type=hidden name="next" value=" http://www.freewebs.com/binfreshcleaningservices/main.htm">
Your Name:
<input type="text" name="Name" align="top"
maxlength="25" size="30" value="Your Full Name">
Your Email Address:
<input type="text" value="Your Email Address" name="Email" align="top"
maxlength="25" size="30">

<select name="pulldown">

<option value="1">Enquiries / Booking</option>

<option value="2">Comments</option>

<option value="2">F.A.Q'S</option>


<textarea cols=25 rows=6 name="Comments">Please leave your comments here.</textarea>
<input type="submit" name="Submit" value="Click to Submit!">
</FORM> </p><br><br>
Hope you can help
P.S here is the website: www.freewebs.com/binfreshcleaningservices soon to be www.binfreshcleaningservices.com

03-05-2005, 09:21 PM
<FORM [...]Validate (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.freewebs.com%2Fbinfreshcleaningservices%2Fcontact.htm&charset=iso-8859-1+%28Western+Europe%29&ss=1&verbose=1) your mark-up. Seriously.

A few tips:

Use a title that is specific to every page. The title should be able to tell a user precisely what is on that page even taken completely out of context.
Use semantic mark-up, not outdated HTML 3.2 junk.
Validate you mark-up, especially if something isn't working properly.
Don't spread your content out too much. Don't make visitors scroll unnecessarily. They should never have to scroll horizontally.
Don't use marquees. Scrolling text is distracting and annoying, especially if there's a lot of text: if the user misses it, they have to wait for a complete cycle.
Don't produce links that link back to the same page.
Here's one way to rewrite your page correctly:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"

<html lang="en" dir="ltr">
<title>Bin Fresh Cleaning Services - Contact Us</title>

<style type="text/css">
body {
font: 100% sans-serif;
margin: 1ex;
padding: 0;

h1, h2 {
margin: 0;
padding: 0;
h1 {
font: 130% sans-serif;
margin-bottom: 0.4em;
text-align: center;
h2 {
font: 110% sans-serif;
margin-bottom: 0.8em;

#navigation li {
list-style-type: none;
margin: 0;
padding: 0;

#contact {
margin-left: 1em;
#contact fieldset,
#contact form,
#contact legend {
margin: 0;
padding: 0;
#contact fieldset {
border-style: none;
#contact legend {
display: none;
#contact li {
padding-bottom: 0.5ex;
#contact table {
margin: 0 0 0 1ex;

#content {
background: white url(http://www.freewebs.com/binfreshcleaningservices/phone.gif) no-repeat 85% 0%;
margin-left: 11.75em;

#navigation {
border: 1px inset black;
padding: 1ex;
float: left;
width: 10em;

<h1>Contact us</h1>
<ul id="navigation">
<li><a href="http://www.freewebs.com/binfreshcleaningservices/">Home</a></li>
<li><a href="http://www.freewebs.com/binfreshcleaningservices/sp.htm">Services and prices</a></li>
<li class="current">Contact us</li>
<li><a href="http://www.freewebs.com/binfreshcleaningservices/about.htm">About us</a></li>
<li><a href="http://www.freewebs.com/binfreshcleaningservices/faq.htm"><abbr title="Frequently asked questions">FAQ</abbr></a></li>
<div id="content">
<h2>Contact methods</h2>
<ul id="contact">
<li>E-mail: xxx@yyy.zzz</li>
<li>Phone: aaaan nnn nnn</li>
<form action="url" method="post">
<input type="hidden" name="userid" value="10679505">
<input type="hidden" name="next" value=" http://www.freewebs.com/binfreshcleaningservices/main.htm">
<td><label for="name">Name:</label></td>
<td><input type="text" id="name" name="Name"></td>
<td><label for="e-mail">E-mail address:</label></td>
<td><input type="text" id="e-mail" name="E-mail"></td>
<td><label for="subject">Subject:</label></td>
<td><select id="subject" name="Subject" size="1">
<option value="Enquires" selected>Enquires/Bookings</option>
<option value="Comments">Comments</option>
<option value="FAQ">FAQ</option>
<td><label for="comments">Comments:</label></td>
<td><textarea id="comments" name="Comments:" cols="40" rows="6"></textarea></td>
<td><input type="submit" value="Send"></td>
</html>As for why it didn't send, you didn't specify the action attribute you probably meant to.


03-06-2005, 08:27 AM
Thanks Mike,
you gave me some great tips on having a user friendly website. There is however, one problem! I am 13, and although i have alot of knowedge of html, i don't know what you mean by i need to validate my mark-up :confused: And what the heck is semantic mark-up?

Also, when i click send, it comes up page not found, if you could tell me the confirmation page, that would be brill!

Once again I am greatful for your help (as is my uncle, it is his site but he does not know how to make them!! :eek: ) and would appreciate any help given.


03-06-2005, 02:20 PM
I thought I'd mention now that the code I posted previously was meant to demonstrate a complete replacement for the page, not just the form. If you're only interested in the form, take only that element (and it's content, of course). To keep it looking the same, you'll need to also copy parts of the style sheet, but trimmed and slightly altered to:

<style type="text/css">
legend {
margin: 0;
padding: 0;
fieldset {
border-style: none;
legend {
display: none;
table {
margin: 0 0 0 1ex;
</style>You'd place that in the head element.

Thanks Mike,You're welcome. :)

There is however, one problem! I am 13, [...]Nothing like learning while you're young. :p Just make sure you learn the right things. The vast majority of written material (on- and off-line) is horribly outdated. The best place to learn, after reading the HTML specification (http://www.w3.org/TR/html4/), are newsgroups like alt.html (pretty much anything related to writing HTML, including associated languages), comp.infosystems.www.authoring.html (only (X)HTML for use on the Web) and comp.infosystems.www.authoring.stylesheets (only style sheet languages [like CSS] for use on the Web).

The HTML spec. is easy to read, though I can't say I've approached it from a thirteen year old's point of view.

Newsgroups (in general) are very much an adult environment and can seem hostile at times. However, as long as you don't pick fights and just accept that what you're told is correct and helpful (even if it doesn't seem like it), you'll be fine. If you do come across obtuse replies, just politely ask the person (preferably by e-mail, if they provide a valid address) what they meant. Newsgroup regulars are extremely knowledgeable and are very helpful - just don't do anything to get on their bad side! :rolleyes: I could probably write a book on how to approach newsgroups...

i don't know what you mean by i need to validate my mark-up :confused: And what the heck is semantic mark-up?There are two approaches to authoring HTML documents: semantic and presentational.

Mark-up languages describe content. They take plain text and add structure and meaning. Each element in HTML provides a different meaning: headings, paragraphs, lists, data relationships (through tables), sections (through div elements). Using elements properly in this manner is what is meant by the phrase, "semantic mark-up". The alternative - presentational - uses HTML elements to only achieve a visual result. Examples of presentational mark-up include tables-for-layout, the font element, the center element, and any attributes (such as align and bgcolor) which do nothing other than change appearance.

Until relatively recently, it wouldn't be possible to use semantic mark-up as user agents (browsers, amongst other software) didn't provide any other way to layout the content of a HTML document. However, with wide (if somewhat incomplete) support of cascading style sheets (CSS) this is no longer the case. CSS provides total and flexible control over content.

The advantages of semantic mark-up is that it typically results in smaller and simpler files (so less to store and transmit). This simplicity makes styling more flexible, and changes easier. With the increasing use of mobile devices and disabled users (who tend to use specialist software), these advantages are important.

It's important to note that you shouldn't use IE when developing a site. IE, by any objective standard, is a terrible browser and is full of rendering bugs. Browsers like Firefox (or Mozilla) and Opera (both are free) give a much more accurate picture of how your site really looks. Once you've finished, then look using IE and attempt to correct any problems.

As for validation, like any language (computer or natural), HTML has grammar. Some elements are only allowed when used with other elements, whilst some elements are forbidden. A validator checks for these sorts of problems and other syntax errors like overlapping elements:

<form ...><div>...</form></div>There are several validator services, the most renowned being the W3C validator (http://validator.w3.org/). Be warned: the output from validators can be a little confusing at first as you'll be unfamiliar with the problems it's trying to warn you about.

Also, when i click send, it comes up page not found, if you could tell me the confirmation page, that would be brill!I didn't include a URL (just the text "url") as I didn't know what the correct one was.

If your host does provide a form processor, you'll have to look through the service help information for the address. As I don't have an account, I might not be able to find it all. Alternatively, ask technical support for the information.

If your host doesn't provide a form processor, you can find free services (http://cgi.resourceindex.com/Remotely_Hosted/Form_Processing/) on the Web.

Hope that helps. Just ask if something didn't make sense - I have a tendancy to be terse.


03-06-2005, 08:40 PM
Thanks once again Mike,
you have provided great help! :D Once again (as always) I have another problem!!!!! :eek: When I click send it comes up:

Method Not Allowed

The requested method POST is not allowed for the URL /binfreshcleaningservices/main.htm.


Apache/1.3.31 Server at www.freewebs.com Port 80

submit a contact form to see what I mean! Could you help me please? sorry for the hassle. From Joe

03-07-2005, 02:48 PM
When I click send it comes up:


The requested method POST is not allowed for the URL /binfreshcleaningservices/main.htm.The URL that needs to be used will point to a server-side script which will read the information submitted by the user and e-mail it to your uncle. Such a URL might be something like http://www.freewebs.com/cgi-bin/formmail.pl but I really advise you to contact the technical support people at FreeWebs for the correct address.

I get the impression that you have to pay for form processing scripts, so you might want to look at the list of services I pointed to in the last link of my previous post.

Good luck,

03-10-2005, 03:22 AM
I have actually used freewebs before and you get so many forms per month but you have to create it using their form maker. It is really stupid but then after you make it go to the page copy the code that they give you and then put it on any of your pages you wish.

03-12-2005, 10:07 AM
thanks the big t,
I knew they (freewebs) provided you with a script, but I just clicked the link they had provided to webmonkey! I will try there form script today and tell you if it works or not, sorry about the long wait of a response, my computer has been broke!!! :( Thanks for your help mwinter and TheBigT