Added support for checkboxes/radio buttons