Save state of checkboxes and radio buttons, more validation added