Where would I setup specific form helpers for different field types?
Shpigford opened this issue · comments
Josh Pigford commented
I want to make use of various Rails form helpers for certain field types.
For instance, for datetime
columns I'd like the form field to use datetime_select
.
Chris Oliver commented
You can either:
- Override the view for an existing field type. Copy the view to your Rails app in the same folder and change it. For example, this one replacing the text_field: https://github.com/excid3/madmin/blob/main/app/views/madmin/fields/date_time/_form.html.erb
- Generate a new field type https://github.com/excid3/madmin?tab=readme-ov-file#custom-fields