Welcome!

This community is for professionals and enthusiasts of our products and services.Share and discuss the best content and new marketing ideas,build your professional profile and become a better marketer together.

Register
0

How can I execute a method by clicking in a form (action) button?

By
Diogo Duarte
on 11/4/15, 9:37 PM351 views

While in a form view, how can I execute a method by clicking in a form (action) button? 


0
Diogo Duarte
On11/4/15, 9:38 PM

Declare a button like "<button name="method_name" type="object" string="text_to_display_on_button"/>" in the form then define the method with the same method name like "def method_name(self):". Remember that methods must always return something, if they return None, client calls using the XMLRPC protocol won’t work. If you have nothing to return, it's common practice to "return True".


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, justuse the commenting tool. Please remember that you can alwaysrevise your answers - no need to answer the same question twice. Also, pleasedon't forget to vote - it really helps to select the best questions and answers!

Keep Informed

About This Community

This community is for professionals and enthusiasts of our products and services.Share and discuss the best content and new marketing ideas,build your professional profile and become a better marketer together.

Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 11/4/15, 9:37 PM
Seen: 351 times
Last updated: 11/4/15, 9:38 PM