Web Administrator's Guide
Friday, November 22, 2024

Best Practices - Forms

Here are a few observations to help make working with forms more efficient and less frustrating:

What TO Do:

  • It is generally best to type the field labels (Name:, Phone:, Email Address:, etc.) out in front of the fields and leave the fields themselves blank so users aren't confused as to whether they should delete what's there or add to it
  • If there is no field named "Email" (as opposed to E-mail, Email Address, Electronic Mail, etc.), you may not receive the submissions because a lot of email providers block messages from unknown senders as spam
  • Form field names cannot contain any special characters or spaces
    • Some fields such as radio buttons and checkboxes cannot contain special characters or spaces in their values either
  • You may find that shorter form field names are also preferable for a variety of reasons
  • You only want to put a maxlength on fields which you want to intentionally limit the total number of characters someone may type into the field
  • If you are going to be receiving a large number of responses to your form over a short period of time or if you want to be able to quickly analyze the results as you would for a survey, you might consider using a third-party forms or survey service such as Formstack, Adobe FormsCentralWufoo, or SurveyMonkey.
  • We recommend always fully testing your forms once they are ready to be published to your site by filling them out exactly as a real submitter would to be sure that
    1. The form works as intended and there is no confusion or frustration to be experienced by the users
    2. That the submission email you receive looks the way you intended and provides you with all of the information you need in a format that is easy to use

Form Field Types:

  • Text fields are best for questions allowing the submitter to enter freeform text as the answer
    • The maxlength value can be used to limit the number of characters the submitter may enter into the field
  • Radio buttons are best for questions asking the submitter to choose only one answer from a series of possible answers (e.g. Gender: Male or Female)
    • The name for each answer in the series should be identical
    • The value for each answer in the series should be unique
  • Checkboxes are best for questions allowing the submitter to choose one or more answers from a list of possible answers (e.g. What are your favorite activities? Swimming, Fishing, Hiking, etc.)
    • Checkbox names should be unique
    • Checkbox values should be something like "true" or "yes"
  • Textareas are best for questions allowing the submitter to enter freeform text as the answer and are generally used for things like questions and comments feedback since they can be made to appear larger in size and will expand to fit the submitter's response
    • Textareas do not have a maxlength property so they cannot be limited like text fields
  • Selection fields are liek the swiss-army knife of form fields since, depending on their settings, they can be made to act like either checkboxes or radio buttons; but because of their size, they save a lot of space when there are several choices (e.g. a list of the States)
  • Hidden fields are used as utilities for extending the form's behavior (e.g. requiring answers to certain fields, providing a link to a return page, etc.) and doing as their name suggest by "hiding" information from plain view

What NOT To Do:

  • Form submission is inherently insecure when it is processed through email so you should never ask for sensitive information like SSN, credit card, bank account info, etc. in one of our forms
    • Services like the ones offered by Formstack and Wufoo which can be setup to submit the form securely to a database are more appropriate for this but you may still have some liability if you are asking for any sort of credit card information if the service you are using is not fully PCI Compliant
Content:Forms
Miscellaneous:Tips & Tricks

Previous Page