I have fields in my table that can be null or have a value of 1. They are populated by checkboxes.
If the field is set to 1,and the user unchecks the box when updating the form, I want to set the value of the field to null.
I think what I need to do is
- get all fields in the class that can be NULL
- compare them to the list of fields that were submitted in the form
- set the values of those fields not present in the form to NULL
Does that sound about right?
If so, how would I go about doing that in xpdo syntax?