How radio buttons values can be accessed in the form processing scripts?

Radio buttons and check boxes are a lot little. Both radio buttons and check boxes are used to group options that user can choose form. Consider an example that you create a form, which lists three product lines and asked users to select which one they were interested in and you wanted to let the users select one, two, or three product lines that they were interested in, you use check boxes to facilitate our information gathering. Perhaps you want to ask users what is their most favorite product line, Check boxes wouldn’t work in this situation, but radio buttons would.

Check boxes allow users to select none, one, or many of the available options among a group of related options. Radio buttons, on the other hand, only allow none or one of the options to be selected from a group of options.

Note that the syntax <INPUT> tag is used when creating a radio button. It looks a lot like the syntax when you created a check box. The only change is the value of the TYPE property from TYPE = CHECKBOX to TYPE = RADIO. Again, with radio buttons, as with check boxes, related radio buttons have their NAME properties equal but different values for their VALUE properties.

You can also use the CHECKED keyword to have a radio button selected by default. Again, its syntax is identical to the syntax for having a check box selected by default. The following line would create a radio button that is checked by default:


The radio buttons ensures that the user selects none or one of the related options. However, if you use the CHECKED keyword to have a radio button selected by default, you restrict the user to having to choose an option. Without a radio button selected by default , the user can simply not choose a radio button option.

If however, one of the radio buttons is selected by default, there is no way the user can unselect the option. So, if you use radio buttons for options that must have a response, such as gender, then it is wise to have one of the radio buttons selected by default. That way, the user cannot submit the form without having selected one of the radio button options.

Choosing your checkboxes and Radio Buttons

Checkboxes and radio buttons are used as a means to select one or many options from a set of related options. It is important, then, that you carefully choose how to label each option, so that each option, in the set of related options, is unique. When using checkboxes and radio buttons, you want to present your user with a series of unique options.

· The south
· The East Coast
· The West
· The Midwest
· The Southeast

What would the user who had visited both the south and the east coast check? Would they check just the southeast checkboxes? Would they check the east coast and south checkboxes? Or would they check all three? This is why it is important when creating both checkboxes and radio buttons to choose options that are distinct from one another.

“Amazon and the Amazon logo are trademarks of, Inc. or its affiliates.”

| Privacy Policy for | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.