Add functionality for dynamically added checkbox and radio buttons

this fixes #20