I have written a form template to be used in different templates with the include tag.
{% include "crm/contact_form.html" %}
This form includes a submit button. Now I want to change the label of the button according to the circumstances the form is used.
For example if the form is included in a add template the label should be “Add” and in a detail template the label should be “Save”.
How can i accomplish this?
You will either need to put the label into a context variable where it can be used by the
contact_form.htmltemplate or switch from{% include %}to an inclusion tag which will let you pass arguments like this: