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
What would you like to be able to do? Can you provide some examples?
I have a boolean field on my model that can have 3 values, "not set" -> NULL, "true" and "false. Right now, I can only switch between true/false but not `NULL.
How could we go about implementing that?
One could add a new option to Field::Boolean like 'nullable'. Although, this could be applied to all fields.
Can you think of other approaches to the problem?
Not really in this case
The text was updated successfully, but these errors were encountered:
The problem with implementing this with a checkbox is that a checkbox only has two states. There's no way to express the three states you require.
Instead, you could create a custom field type that shows something else, perhaps three radio buttons. These would send values null, true or false, and a controller that knows how to use it, perhaps by overriding Administrate::ApplicationController#resource_params.
I have a boolean field on my model that can have 3 values, "not set" ->
NULL
, "true" and "false. Right now, I can only switch between true/false but not `NULL.One could add a new option to
Field::Boolean
like 'nullable'. Although, this could be applied to all fields.Not really in this case
The text was updated successfully, but these errors were encountered: