In ExAdmin, how can I make the input field of a boolean render as a checkbox.
By default (i.e. empty register_resource App.Reservation do end) it shows up as a checkbox, but I need to customize the form and can't get it to be a checkbox when defining it in the inputs list.
register_resource App.Reservation do form reservation do inputs do input reservation, :is_booked end end end
The documentation mentions check_boxes and radio for groups but not for single fields.
input reservation, :is_booked will create a text field.
input reservation, :is_booked, type: :boolean will create a text field that says true as a default value.
Would like to have it as a checkbox
Aucun commentaire:
Enregistrer un commentaire