I studied the Crispy-Forms documentation and I tried to put an extra button into one of my forms. With
self.helper.add_input(Button('back', "Back", css_class='btn'))
I can add a nice button. But the Button() wont take an onclick or on_click-attribute. So how can I add logic to this button? Adding an onclick event with JQuery isnt a very nice solution…
Thanks!
Ron
This is not included by default (afaik..).
If you just need this once, is possible to use crispy-forms HTML Layout Object
What do you then dislike using jQuery? You could handle this rather easy and generic, using something like:
and then just pass the class: