A form has multiple Buton, methods are written in a class, the same common template how to give different buttons and different action?

Source: Internet
Author: User
A form has multiple Buton, methods are written in a class, the same common template how to give different buttons and different action?

Reply content:

A form has multiple Buton, methods are written in a class, the same common template how to give different buttons and different action?

I have written a similar document. is based on the Django framework. But the principle is the same. You can refer to it for a moment.
The main thing is to give not a button a value, in view by judging the value of the key to determine the click from that button.
http://www.everlose.info/work/2013/04/26/django%E4%B8%AD%E4%B8%80%E4%B8%AAform%E6%9C%89%E5%A4%9A%E4%B8% aasubmit%e7%9a%84%e5%a4%84%e7%90%86/

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.