You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NullableField is a fairly obscure field that doesn't appear to work
By default, DBString will set an option $this->options['nullifyEmpty'] = true; which means convert empty strings to null before saving in the database
If 'nullifyEmpty' is set to false, what is supposed to happen is the DBVarchar/DBText field is wrapped by NullableField which adds a checkbox to the field. This is supposed to show to the CMS user if the field is null or not, and if they uncheck the field then it's supposed to save the value as a blank string rather than as null
There are many things wrong with this field:
Unchecking the field makes no difference, blank values are still saved as null
The CSS for the field is broken and it's misaligned
How a value is stored in database should not be a concern for content editors
We should simply remove this class
Note that we should keep the 'nullifyEmpty' option as that looks like it still works and allows users to programmatically set blank string as a database value
NullableField is a fairly obscure field that doesn't appear to work
By default, DBString will set an option
$this->options['nullifyEmpty'] = true;
which means convert empty strings to null before saving in the databaseIf 'nullifyEmpty' is set to
false
, what is supposed to happen is the DBVarchar/DBText field is wrapped by NullableField which adds a checkbox to the field. This is supposed to show to the CMS user if the field is null or not, and if they uncheck the field then it's supposed to save the value as a blank string rather than as nullThere are many things wrong with this field:
We should simply remove this class
Note that we should keep the 'nullifyEmpty' option as that looks like it still works and allows users to programmatically set blank string as a database value
I used the following to test it
The text was updated successfully, but these errors were encountered: