How to pass css class through to form fields? #57
-
For the individual form fields I was trying to pass a class through like this but it doesn't seem to be working. Is there a better place or different way to add this? <%= render partial: field.to_partial_path("form"), locals: { field: field, record: record, form: form, resource: resource, class: 'max-w-lg block w-full shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:max-w-xs sm:text-sm border-gray-300 rounded-md' } %> |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can copy the template over to your Rails app and override it there. Rails will check your app for the template before using the gem's so you're able to customize it easily. |
Beta Was this translation helpful? Give feedback.
-
Amazing. Thank you! |
Beta Was this translation helpful? Give feedback.
You can copy the template over to your Rails app and override it there. Rails will check your app for the template before using the gem's so you're able to customize it easily.