layout | title | searchable | versions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
widget |
Contact Form |
true |
|
Add a contact form widget to your template.
You can add a contact form widget to your template to allow the visitor to send an email to the email address in the manage shared contact section or customised email address by the Editor user. The widget can be later customised within the Editor.
To include a contact form widget in your template you will need to add the following line:
{% highlight python %} {% raw %}
{{widget('contactform', 'contact', {})|raw}}
{% endraw %} {% endhighlight %}
{% highlight python %} {% raw %}
{{widget('contactform', 'contact', { 'text': 'Submit', 'formTitle': 'Contact Us', 'email': 'profile' })|raw}}
{% endraw %} {% endhighlight %}
{% highlight html %} {% raw %}
{% endraw %} {% endhighlight %}
You can change the following options for the widget:
-
text
: The text on the button -
italic
: The text style on the button.true
orfalse
(default) -
bold
: The text style on the button.true
orfalse
(default) -
align
: The text style on the button. You can set it:justifyleft
justifyright
justifycenter
(default)justifyfull
-
fontSize
: The text style on the button. You can set it:inherit
(default),14
,16
,18
,20
,22
,24
-
formTitle
: The subject for the email -
email
: The email address that the final message will be sent to. Usingprofile
(default), will mean that it will use the email set in the manage shared email address settings. Alternatively you can set a custom email address, e.g.example@example.com
-
goalSource
: The source of the URL to redirect to after the form is submitted. Usingprofile
will mean it will use the internal URL, or you can set a URL of your choice -
goalUrl
: The URL after submit the form- If the
goalSource
is set toprofile
, it should be set to an internal link, e.g.home
- If the
goalSource
is set tocustom
, it should be set to an external link, e.g.www.mysite.com
- If the