how to call javascript function using widgets in django form

Published: 14/01/2019
how to call javascript function using widgets in django form
Source: STACKOVERFLOW.COM

Hi i want to call js function when a field in form is clicked or typed in I have used this code: class ProviderSugForm(forms.ModelForm): class Meta: model = ProviderSug fields = ['due_date', 'price', 'description', 'discount'] widgets = { 'due_date': forms.DateInput(attrs={'class': 'datepicker'}), 'price': forms.NumberInput(attrs={'onclick': 'numberWithCommas()'}), } but the js

Read more
Related news
Comment
FACEBOOK