SEBLOD icon indicating copy to clipboard operation
SEBLOD copied to clipboard

Add NULL as a default value option

Open Giuse69 opened this issue 7 years ago • 1 comments

Hi, when customizing a field it is possible to set the default value but this is just a string. If the field has a non string storage (like a widely used INT/SMALLINT...) and it is not filled in the form, there is no way to make the form work: an empty string cannot be inserted in the DB column so the form submission fails, and there is no way of specify NULL as the default value (except writing specific PHP code).

The request is to have a radio option for default value in order to be able to set NULL or a specified string as a default value for a field.

Giuse69 avatar Sep 07 '18 09:09 Giuse69

Or better: Seblod should store NULL into a DB column when the value in the form is empty and the column is numeric and not VARCHAR. Now Seblod stores 0 into a numeric column when the form field value is empty and it is not correct (0 is a normal value, NULL is the value for "no value"). cheers

Giuse69 avatar May 13 '19 19:05 Giuse69