Form labels you can click

Submitted by charles on
I have been using phpMyAdmin for a long time now to manage MySQL databases via the web, and have really loved the functionality they provide when displaying forms. If there is a radio button or check box that needs to be checked, you don't have to aim for the box or button itself, you can just click on the text next to the button/box. And voilĂ , the button is checked. This makes it so much more useable, especially when filling in long forms. To do this all you need to do is put a label tag around the text next to the checkbox/radio button, and put in a 'for' attribute that tells the form what button or checkbox to check when you click on the label. For example:



Gives you this (click on the text below the buttons):
Which version of PHP do you use?