2

I want to change the css of a button of FileField form adding a class of Materializecss:

enter image description here

I tried using jQuery with this code:

$(":input").addClass("btn");

But it doesnt add the style to the button, it does for the whole input (logic):

enter image description here

So how can I access to the button? Is there any way to add the class="btn" to the button of the Filefield of the form model of Django?

Form code:

class DocumentForm(forms.Form):
    docfile = forms.FileField(label="Select a file")
    captcha = CaptchaField()
Rashomon
  • 5,962
  • 4
  • 29
  • 67

0 Answers0