Automatically add hidden input fields alongside checkboxes