class MyForm(forms.Form): field1 = forms.CharField(widget=forms.TextInput(attrs={'class' : 'myCSSclass'})) field2 = forms.CharField(widget=forms.TextInput(attrs={'class' : 'myCSSclassX myCSSclass2'}))