Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8012271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:16:53+00:00 2026-06-04T19:16:53+00:00

I studied the Crispy-Forms documentation and I tried to put an extra button into

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:16:54+00:00Added an answer on June 4, 2026 at 7:16 pm

    This is not included by default (afaik..).
    If you just need this once, is possible to use crispy-forms HTML Layout Object

    HTML('<input type="button" name="Save" onclick="do_whatever" />')
    

    What do you then dislike using jQuery? You could handle this rather easy and generic, using something like:

    $('form :submit.ajax_submit').live('click', function(e) {
        e.preventDefault();
        var my_form = $(this).parents('form');
    
        // do whatever
        alert(my_form.attr('id'));
        alert(my_form.attr('action'));
    });
    

    and then just pass the class:

    Submit('save', 'save', css_class='ajax_submit')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I studied the Twitter API Documentation today. Only find that we could use Twitter
I studied a lot and tried to solve it but I am facing the
I have studied a bit into the lifespan of the DataContext trying to work
every one i have studied and implemented these tutorials of ray http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12 http://www.raywenderlich.com/3525/apple-push-notification-services-tutorial-part-2 i
I studied several samples, including one here , and basically all I need to
Having studied the switch documentation and discovering it can only switch on integral types
I haven't studied design patterns, but I'm willing to bet that there is one
I'm the newcomer into java ee,I have studied about core java,servlet,jsp. Could anyone give
I have studied the use of Namespaces in PHP a while back but recently
I have studied the two graph traversal algorithms,depth first search and breadth first search.Since

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.