cant set class and if to passwword input in django forms code example
Example 1: jquery enable submit button
$("#submitButtonID").prop('disabled', true);
$("#submitButtonID").prop('disabled', false);
$("#submitButtonID").attr('disabled','disabled');
$("#submitButtonID").removeAttr('disabled');
Example 2: multiple form in one class djanog
class MultipleFormsDemoView(MultiFormsView):
template_name = "pages/cbv_multiple_forms.html"
form_classes = {'contact': ContactForm,
'subscription': SubscriptionForm,
}
success_urls = {
'contact': reverse_lazy('contact-form-redirect'),
'subscription': reverse_lazy('submission-form-redirect'),
}
def contact_form_valid(self, form):
'contact form processing goes in here'
def subscription_form_valid(self, form):
'subscription form processing goes in here'