Gravity Forms
[!NOTE] This integration requires Gravity Forms (any license tier) installed and active on your WordPress site.
Overview
Section titled “Overview”The Gravity Forms integration for WPsigner allows you to automatically generate signing documents when a Gravity Forms form is submitted. Using a feed-based system, you connect a Gravity Forms form to a WPsigner template, map form fields to signer information and template variables, and optionally auto-send the document for signing.
Key Features
Section titled “Key Features”- 📝 Feed-based Configuration — Create multiple feeds per form for different templates
- ✍️ Signer Mapping — Map Name and Email fields to document signers
- 🔗 Variable Mapping — Pass custom form data (company, phone, etc.) to templates
- 📧 Auto-send — Optionally send signing emails immediately after submission
- 🔒 Security — Nonce verification, capability checks, rate limiting, input sanitization
-
Install Gravity Forms
Ensure Gravity Forms is installed and activated. Visit gravityforms.com to get a license.
-
Navigate to Integration Settings
Go to WPsigner → Integrations and click Configure on the Gravity Forms card.
-
Create a Feed
Click New Feed and configure:
- Feed Name — A descriptive name (e.g., “Service Contract”)
- Gravity Forms Form — Select the form to trigger document creation
- WPsigner Template — Select the template to use
- Primary Signer — Map the Name and Email fields from the form
- Variable Mapping — Map form fields to template variables (optional)
- Auto-send — Enable to send immediately (optional)
-
Test the Integration
Submit the form and verify a document is created in WPsigner → Documents.
Feed Configuration
Section titled “Feed Configuration”Primary Signer
Section titled “Primary Signer”Map form fields to extract the signer’s name and email:
| Setting | Description |
|---|---|
| Name Field | The form field containing the signer’s full name |
| Email Field | The form field containing the signer’s email address |
[!TIP] Gravity Forms splits Name fields into sub-inputs (First, Last). WPsigner detects these automatically — you’ll see options like “Name (First)” and “Name (Last)” in the field selector.
Variable Mapping
Section titled “Variable Mapping”Map form fields to template variables using the custom.* prefix:
| Template Variable | Form Field Example |
|---|---|
custom.company | Company Name field |
custom.phone | Phone Number field |
custom.address | Address field |
custom.amount | Total field |
Variables appear in your template as {{custom.company}}, {{custom.phone}}, etc.
Document Title
Section titled “Document Title”Use dynamic placeholders in the document title:
Contract - {{signer_name}} - {{date}}Available placeholders: {{signer_name}}, {{signer_email}}, {{date}}, {{company_name}}
Security
Section titled “Security”The integration implements comprehensive security measures:
| Layer | Implementation |
|---|---|
| Authentication | Nonce verification on all AJAX handlers |
| Authorization | manage_options capability required for feed management |
| Rate Limiting | Maximum 10 documents per minute per form |
| Input Sanitization | All fields sanitized with appropriate WordPress functions |
| Email Validation | Double validation with sanitize_email() + is_email() |
| XSS Prevention | Output escaping with esc_html(), esc_attr(), esc_url() |
Developer Hooks
Section titled “Developer Hooks”wps_gravityforms_document_created
Section titled “wps_gravityforms_document_created”Fires after a document is created from a form submission.
add_action('wps_gravityforms_document_created', function($document_id, $entry_id, $entry, $form, $feed) { // Custom logic after document creation // e.g., update CRM, send notification, log event}, 10, 5);Parameters:
| Parameter | Type | Description |
|---|---|---|
$document_id | int | The created WPsigner document ID |
$entry_id | int | The Gravity Forms entry ID |
$entry | array | The Entry Object with submitted values |
$form | array | The Form Object with form configuration |
$feed | array | The feed configuration that triggered creation |
Use Cases
Section titled “Use Cases”| Scenario | Setup |
|---|---|
| Client onboarding | Contact form → NDA template → Auto-send |
| Quote requests | Quote form → Service agreement template |
| Job applications | Application form → Offer letter template |
| Event registration | Registration form → Waiver template → Auto-send |
| Rental agreements | Booking form → Rental agreement template → Auto-send |
| Service contracts | Order form → Service contract template |
| Vendor agreements | Vendor intake form → Vendor contract template → Auto-send |
| Consent forms | Patient/client form → Consent document template |
Multiple Feeds
Section titled “Multiple Feeds”You can create multiple feeds for the same form or template:
- One form, multiple templates: A single form submission generates different documents based on different templates
- Multiple forms, one template: Different forms can all use the same document template with different signer data
- One-to-one: Each form has its own dedicated template
Each feed operates independently. When a form is submitted, all active feeds linked to that form will trigger.
Compatibility
Section titled “Compatibility”| Component | Supported Versions |
|---|---|
| Gravity Forms | 2.5+ (any license tier) |
| WPsigner | 1.5.0+ |
| WordPress | 5.8+ |
| PHP | 7.4+ |
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”| Issue | Cause | Solution |
|---|---|---|
| No document created after submission | Feed not active | Verify the feed is enabled (green “Active” badge) |
| No document created | Form/template mismatch | Check that the form ID matches the feed configuration |
| Missing signer data | Fields not mapped | Ensure the signer Name and Email fields are mapped |
| Signer not receiving email | Auto-send disabled | Enable “Auto-send” in the feed settings |
| Signer not receiving email | SMTP issue | Check your WordPress email configuration (use an SMTP plugin) |
| Sub-fields not appearing | Complex field format | Look for labels like “Name (First)” in the field selector |
| ”Gravity Forms is not installed” | Plugin not active | Install and activate Gravity Forms with a valid license from gravityforms.com |
| Rate limit exceeded | Too many rapid submissions | Wait 60 seconds — limit is 10 documents/min per form |
Checking Error Logs
Section titled “Checking Error Logs”If documents are not being created, check the WordPress debug log:
- Enable debug logging in
wp-config.php:
define('WP_DEBUG', true);define('WP_DEBUG_LOG', true);- Check the log file at
wp-content/debug.log - Look for entries starting with
[WPsigner GravityForms]
Next Steps
Section titled “Next Steps”- Templates — Learn more about creating and managing templates
- Document Workflow — Understanding document statuses and actions
- REST API — For advanced programmatic integrations
- WhatsApp Integration — Send signing links via WhatsApp
- Fluent Forms — Alternative form plugin integration
- Elementor Forms — Build forms with Elementor Pro
- Automation — Connect with workflow automation platforms