formulize
formulize copied to clipboard
When creating a new form element, add an option to set default value (for radio buttons at least) on all existing entries.
If you create a new radio button element, and set the default to Yes, then either set that value on all existing records, or add an option so the user can choose to do so.
As an example of how this should work, suppose there is a radio button element with no default value set. Some records are created, say 10, 20, whatever, and a bunch of those have no value selected in the radio button element. Then you want to set a default value. You go to the admin page for the radio element, and choose one value to be the default. Currently, nothing happens to existing values, but in some cases we may want all existing blank values to be set to that default. This change would add a checkbox labelled "Apply this default value to all existing blank values.", and when the change is saved, all the existing values are updated.
#203
Yeah, this should be generalized for all elements, perhaps taking advantage of a method in the element class
Should be generalized to handle newly created defaults on existing elements. Basically all elements need a choice to populate null fields in the database with the default value, at any time.