post by grillo on Jun 17, 2022

How can I set default (or empty) value for a dropdown in add state that it comes from a setRelation?
Like this (GroceryCrud 2.0.2 version)
image

Thanks!

26 days later

post by grillo on Jul 14, 2022

“The issue here is that if the field is not NULLable (e.g. accept NULL value) is showing a dropdown and the first one is always selected. So I am using the empty field only if the field can also take NULL value. It works fine if making the field to accept NULL in the database. If you don’t want to have NULL as value in the database you will need to make sure that this field will need to be required with: requiredFields | Grocery CRUD - A PHP CRUD Generator Library” txs Johnny

1 / 2
Jun 2022