0

I have django form which consist of two image buttons. Now how can i perform two different POST action based on specific image button clicked in views.py?

I followed the below link

How can I build multiple submit buttons django form?

The above link will use name property of input tag and performs the action.

But this link will only describes about submit buttons but not about image buttons

Any solutions?

Thanks in advance

Community
  • 1
  • 1
Asif
  • 1,775
  • 4
  • 25
  • 39

1 Answers1

1

Image buttons work same as "normal" buttons. Just assign a name attribute as you would do with input type button.

The link you provide describes what to do.

Jingo
  • 3,200
  • 22
  • 29
  • if i add this will work. But if i add below mentioned image button then form will not POST. What is the difference between above two tags? – Asif Feb 13 '12 at 08:59