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
Hey, I found an issue trying to set custom classes on widgets.
The renderer overwrites classes declared on a widget, making it impossible to do this:
my_button = forms.CharField(
label="",
widget=forms.widgets.TextInput(
attrs={
"type": "button",
"value": "Configure",
'class': 'btn-configure', # never included in the class attribute
}
),
)
Fields should add to any existing attributes instead of replacing them.
The text was updated successfully, but these errors were encountered:
You must override the class FormRenderer. Simply inherit from formset.renderers.tailwind.FormRenderer and override the method to add the CSS class, aka. _amend_text_input().
Hey, I found an issue trying to set custom classes on widgets.
The renderer overwrites classes declared on a widget, making it impossible to do this:
Fields should add to any existing attributes instead of replacing them.
The text was updated successfully, but these errors were encountered: