The form is the most important thing in the interaction of the Web site. They collect the information of the visitor, which can be the user ID and password of the login form, or may be a personal information page in an application. Ask the visitor to type information in a text box, or ask them to use a radio button or checkbox to select an option, etc., these are more than a hyperlink and display another web page, which is forced users to be higher. Hierarchical participation. Visitors This higher level of interaction makes form availability into a key issue that Web builders need to care.
From an availability point of view, the worst case is that an visitor fills in a form, but cannot get the result of their desired (for example, login failure, application rejection, or database cannot be updated). The most common reason for this failure is that the visitor entered incomplete or incorrect data. However, it is better to see this as a user's error, but also to correct the defects in these usability. Our goal is to enable each user to fill in the information correctly when it is used, and then successfully submit it.
Good form design includes many aspects; the first aspect is to determine what data needs to collect and extend in the background processing form data. This article focuses on which methods we can take to ensure accuracy and integrity of data input.
Providing a clear instruction is to provide the visitor to provide a clear and complete instruction, accurate and unsealed definition, what information they need to enter in the form. However, we do not need to provide a directive after each text box or other form element; in many cases, a simple label (such as Last Name, etc.) is already enough.
On the other hand, some form elements require more detailed instructions, or to determine the required data, or help the visitor input data in the correct format. For example, visitors may require special instructions to illustrate how to find and enter a security code on the signature strip behind the credit card. This is a relatively new feature of credit cards, and different credit cards and different Web sites describe the terms used by different web sites, so it is not enough to put a label behind a text box. Complex again, the code usually consists of 4 to 6 numbers, and in fact, only the last three is meaningful. A better solution to this particular problem is to create a separate instruction page that explains how to find and enter a secure code, then place a link to the command page after the table field is placed. This can have a complete directive, and it can also include an example image, and will not cause formal confusion.
Determine the required field when submitting the form, only because there is no input content in a must-be domain, it is a very depressed experience. This is the reason why you must make an item must be indicated on a form. These domains are usually used using an asterisk and / or a prominent color (such as red). If you use an asterisk, you have to provide an interpretation of an asterisk at the top of the page, so that the visitors are not missing.
In addition, do not only depend on the color to identify the required field. Some users may be color blind, or may view our form using black and white displays.
Help Visters Enter data to make data input as much as possible. Usually, this means that the use of text boxes that require users need to enter data, replace them with the list box, and the list box allows visitors to select an option. The list box eliminates the possibility of visiting the incorrect input error.
Use a drop-down list box to select a double-alphabetic abbound in the US post address, a better example. The pop-up calendar is a more fine example, the visitor can click on a date on the calendar and then the date will be entered into the form in the correct format.
Instead, you need to enter the city, state and postal codes in a text box, and separate spaces and punctuation are a bad example. If our database or other application needs to enter an address in a domain in that format, then we can try to provide a clear instruction for the visitor to tell them how to fill in the form. A better solution is to use separate form fields for urban, state, and postal codes, and then combine these inputs into a data string when processed in the background form. This means writing more code, but it provides better availability and reduces errors, I think it is worth doing. Verify data input Even if we use a good label and instruction to design a form, not all users will submit forms in an accurate and complete information each time. A validity verification script can detect whether the information is missing or its format is correct before forming the form data being submitted to the database or application.
Under normal circumstances, a script called when you click on the submission button of the form is responsible for processing form verification. Verify the script checklist to verify the required fields of data; and according to the logic of the script, you can also test whether the formats in the domain are correct. For example, the script can check if there is an @ character in an email address. If the script detects a problem, it will abort the commit process and display an error message.
We can use JavaScript or other own scripting languages to create its own form verification script, and we can also use many existing prefabricated scripts. Dreamweaver users can use several extensions, and add form authentication behavior by clicking. From an availability point of view, which code we use to verify the form is not important, it is important to use some kind of verification to prevent the detectable error caused the application to reject the form. If the form data is rejected after the submission, the visitor usually has to fill some data. Submit by interrupt form, verify script allows visitors to return to the form page, collect problems, and then re-submit forms with minimal trouble.
Creating a meaningful error message In order to make a form verification script can achieve its purpose, the error message displayed when an error is encountered must make sense to the visitor. Error messages should clearly indicate a form field containing errors and provides instructions that correct that problem.
A common problem is that the error message uses the HTML ID attribute to indicate a form element that causes problems. Don't let visitors guess which domain is TextBox1. Error message should look like this: "The first Name field lacks data."
This is our work for your work. An important aspect of form availability is to take a measure to reduce the data input error that the user may commit to the user with the form interact. Error control work should include the following aspects, one is to prevent errors using a form label and instructions, and then use a form verification mechanism to capture errors before the form is submitted to the application.
Author: Mbenichael Meadhra it has been working since the Web's inception in the industry. He has more than 30 books in writing.