Hi terrymckinven,
This may not directly apply to the question of getting a form handler in place, but it is worth giving heed to the controls that are handing user information over to the handler. Even if there are no technical errors, the quality of your form will have an impact on how much it is used, and on the reliability of the information that is passed along from the user. Valid, accessible, semantic markup is the key to ensuring the user and you get the most from web input.
Permit me to pick at the code above, just a little...
Hopefully the
Code:
<link href="mainform.css" type="text/css" rel="stylesheet" />
is in the HEAD section of your html document. Likewise, the
element embedded in your form mark-up rightfully belongs in the head to be valid xhtml.
LABEL is intended to describe a corresponding form control, as in
Code:
<label for="querytype">Query Type</label>
<select name="querytype" id="querytype">
<option />
<option />
</select>
Note how the
id=" %1 " fragment identifier attribute in the SELECT control corresponds with the
for=" %1 " attribute in the LABEL element. It deserves noting that id= and name= have different uses, and should be treated independently, as a rule. Follow the W3C and WAI guidelines on this and you'll be okay.
When no FOR= attribute is included, the LABEL tag refers only to its own contents, so <label>Something</label> ends up being a label for nothing, and has no explicit ties to adjacent controls. If one wishes to use the tag in this manner, then wrap the control, as in,
Code:
<label>Options: <select><option /><option /></select></label>
or
Code:
<label><select><option /><option /></select> Options</label>
Other controls apply, including INPUT, TEXTAREA and discrete selection radio button groups and check box groups.
Empty FIELDSET elements, like most empty elements may cause validation errors, or at least TIDY errors. The old "no empty divs' rule more or less applies across the board. An exception to this would be if the element had an id= attribute intended to let Javascript identify it while generating scripted content, as in
Code:
<div id="menu"></div>
To be valid, FIELDSET needs be accompanied by a LEGEND. The normal behavior of a fieldset is to draw a border around all the controls within it, and legend provides the text title that displays at the top, within the border. These behaviors can be suppressed with CSS, but the elements should be included, even when suppressed. Assistive devices depend upon the added information and organization.
The jury may be out on the RESET button, but from an accessibility standpoint, it can lead to confusion or frustration on the part of the user. It becomes more frustrating the longer the form if one accidentally clicks the wrong button. The probability a frustrated user will refill a long form is practically nil. Something to consider. If the user really wants to start over all they need do is re-enter the page.
Where multiple selections are available, you may wish to include MAKE SELECTION, NONE SELECTED or DOES NOT APPLY as an option, then preselect it. If the user sends the form without making a choice, it won't be misleading to the person reading the information.
++++++++++++++++++
Can we assume that FEEDBACK.PHP is your form handler? If so you may wish to insulate it from the main root of your site and stash it in a restricted folder protected from prying eyes with .htacess and robots.txt. It may do well to disguise the name a little too, but this is something you will need to research.
Be sure the form handler (action="FORM_HANDLER") is configured to send output to a valid recipient, preferably on the same domain as the web form (for added credibility and 'trustworthy' replies). It follows that one might expect a reply from info+xyz.com if that's the domain from which they submitted the form. A reply from joe4567+hotmail.com will just look like spam.
It's noble that you're getting right to it, designing a powerful form, though I would recommend starting with a simple feedback form with name, e-mail and text message. This will give you a chance to get things working without all the fine details getting the way.
Cheers!