I am using
#state values in a
hook_form_alter() to disable field_2 if field_1 (a checkbox) is checked. It works and all is good.
Now I want to empty field_2 as well. I cannot see a way to do that with the
How can I make sure that values don't get saved for fields that are conditionally disabled, even if the user enters a value first?