Hi, i'm struggling with setting classes on input elements.
I'd be happy to contribute to the documentation but need to figure it out first.
I'm trying to add a class to the select input, this is what i've so far:
<%= f.select :client_id, options_from_collection_for_select(Client.all, :id, :name), class: 'form-select-sm' %>
- html: { class: 'form-select-sm' }
- html_options: { class: 'form-select-sm' }
- html_options: { control_class: 'form-select-sm' }
- wrapper_class: 'form-select-sm'
None of these change the actual input class. It still produces:
<select class="form-select" name=[…]>
Similarly, trying to change the 'mb-3' class on a checkbox input using the same method above never overwrites the default margin. I can't find anything in the docs, am i missing something?
Hi, i'm struggling with setting classes on input elements.
I'd be happy to contribute to the documentation but need to figure it out first.
I'm trying to add a class to the select input, this is what i've so far:
None of these change the actual input class. It still produces:
<select class="form-select" name=[…]>Similarly, trying to change the 'mb-3' class on a checkbox input using the same method above never overwrites the default margin. I can't find anything in the docs, am i missing something?