Added support for checkboxes and radio buttons