This piece of code is an addon to the famous Contact Form 7 Wordpress plugin. It brings a new field type to forms that allows users to submit an handwritten signature.
The plugin uses Szymon Nowak's great Javascript library (https://github.com/szimek/signature_pad).
This plugin requires the Contact Form 7 plugin.
- Upload plugin files to your plugins folder, or install using WordPress' built-in Add New Plugin feature
- Activate the plugin
- Edit a form in Contact Form 7
- Choose "Signature field" from the Generate Tag dropdown
- Follow the instructions on the page
If you want the signature image to be included in the body of your emails, just put an image tag which src attribute is set to be the content of your field, just like this :
<img src="[your-signature-field]"/>
If you want the signature image to be sent as an attachment to the email, just follow these easy steps :
- add a "attachment" parameter to your field like this :
[signature your-signature-field attachment]
- add the signature tag to the mail attachment section, like you would do for a file (see this tutorial) :
[your-file][your-signature-field]
Your contact form needs to send HTML formatted messages for it to work properly, so don't forget to check the corresponding box at the bottom of your email settings.
Important note : Plugin scripts are loaded in the footer, so your theme MUST be using the wp_footer() template tag for the signature field to work properly.
For release notes and more, please check the Wordpress plugin repository
This plugin was tested with CF7 versions down to 3.5. Use it with older versions at your own risk.