Forms can increase the interactivity of a site by allowing the user to give feedback, make a purchase or fill out an application. Forms can be thought of as having two main components. The first part is the HTML markup that creates the form on the web page and the program on the server that processes the information.
There are two ways that this information can be delivered, GET and POST. In the GET method the data from the form is attached to the url sent to the server. The information will appear after the question mark in the url. The GET method is the default method if you do not pick one for your form. The GET method is best for information that does not need to be secure. In the POST method, only the server sees the information. This method is best for information or actions that do need to be secure.
A badly designed form can be confusing or difficult to use. As with most projects involving creating a layout, you are going to want to create a diagram. Write down the questions you want the form to address and the order you want them to appear in. Take a look at forms on other sites to get a feel for how the form should look. Forms should be simple, intuitive and easy to use. The form should also contain hints on what the user should be doing, and error messages should clearly explain what went wrong if the user fills out the form incorrectly.
When designing your form, you should think about the controls that you are going to be using. This means that you should choose the controls that will get you the right information in the right way. For instance, if you have a few possible answers but only one answer is required you might pick a radio button. If you have a few possible answers and multiple answers are allowable, you might pick a check box. (And if you have many possible choices and check boxes would be confusing, you might use a drop menu.)
When you’ve put your form together, test your form by having other people use it. (It is helpful to already have a questionnaire ready for them to fill out.) One of the things you could do to test your form is have your testers fill out the form both correctly and incorrectly so that you can also check the usefulness of any error messages you create. The kinds of questions you will want to ask are if the form was easy to use, if the error messages explain what went wrong, and if there is anything wrong with the general design. Keeping these general guidelines in mind should help you create a useful, functional form.