Null option for Select Field
Works fine for saving, but Standard is not preselected on Edit if the value equals null. Suggestions for solving this?
6 Replies
null as array key is converted to empty string in php unfortunately
maybe use ->placeholder('Standard')
exactly right
no need for a null option at all
A null option is needed to set it to null though too
why
the placeholder option sets it to null
Figured the placeholder did nothing. Okie dokie. Thanks!
is the placeholder intended to set the option to null when ->relationship() is used for the options? for a record that has already been saved, selecting the placeholder doesn't appear to provide null, it just provides the last saved value.