Adding support for radio buttons and checkboxes.