InputGuard integration is really easy:
Step 1 - Client Side
Integrate the InputGuard UI in your web form.
a) Load the InputGuard script
b) Use a placeholder within your web form
If your “Submit” button is of class
inputguard-submit-button and is disabled, InputGuard enables the button after computing the signature.
This is completely optional.
Step 2 - Server Side
Verify the InputGuard signature from your web server. For this, simply query https://guard.zenofx.com/verify with the form’s signature value as a GET or POST parameter. Possible return status codes are:
- 200 (OK): Verification successful.
- 404 (Forbidden): Verification failed. In this case, your site should display an error message for the user.
- 429 (Too many requests): Rate limit of free version reached. Your site may also display an error message.
- 402 (Payment required): InputGuard Pro or Enterprise license expired. Your server should not treat this as a user error. Instead, a message to the administrator may be sent.
Example for Python:
Migrate to Pro Version
When migrating to InputGuard Pro, simply change
All other code may remain unchanged. After migration, your server will receive 402 Payment required responses until InputGuard Pro is licensed for your site.
The Pro version has additional I18n options. You may use
inputguard-pro-de.jsfor German translation
inputguard-pro-es.jsfor Spanish translation
inputguard-pro-fr.jsfor French translation
inputguard-pro-it.jsfor Italian translation
The Pro version also allows custom colors. Simply style our pseudo element
inputguard-style as follows:
The Pro version also uses custom events to allow your site to react on InputGuard status. The following events are supported:
inputguard-checked: Sent after computing the signature, useful e.g. for enabling your “Send” button
inputguard-error: Sent if something went wrong, useful for displaying an error message. Contains detail message in field
Example for using eventing (in your own