Skip to content

Gravity Forms

[!NOTE] This integration requires Gravity Forms (any license tier) installed and active on your WordPress site.

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.

  • 📝 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

  1. Install Gravity Forms

    Ensure Gravity Forms is installed and activated. Visit gravityforms.com to get a license.

  2. Navigate to Integration Settings

    Go to WPsigner → Integrations and click Configure on the Gravity Forms card.

  3. 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)
  4. Test the Integration

    Submit the form and verify a document is created in WPsigner → Documents.


Map form fields to extract the signer’s name and email:

SettingDescription
Name FieldThe form field containing the signer’s full name
Email FieldThe 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.

Map form fields to template variables using the custom.* prefix:

Template VariableForm Field Example
custom.companyCompany Name field
custom.phonePhone Number field
custom.addressAddress field
custom.amountTotal field

Variables appear in your template as {{custom.company}}, {{custom.phone}}, etc.

Use dynamic placeholders in the document title:

Contract - {{signer_name}} - {{date}}

Available placeholders: {{signer_name}}, {{signer_email}}, {{date}}, {{company_name}}


The integration implements comprehensive security measures:

LayerImplementation
AuthenticationNonce verification on all AJAX handlers
Authorizationmanage_options capability required for feed management
Rate LimitingMaximum 10 documents per minute per form
Input SanitizationAll fields sanitized with appropriate WordPress functions
Email ValidationDouble validation with sanitize_email() + is_email()
XSS PreventionOutput escaping with esc_html(), esc_attr(), esc_url()

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:

ParameterTypeDescription
$document_idintThe created WPsigner document ID
$entry_idintThe Gravity Forms entry ID
$entryarrayThe Entry Object with submitted values
$formarrayThe Form Object with form configuration
$feedarrayThe feed configuration that triggered creation

ScenarioSetup
Client onboardingContact form → NDA template → Auto-send
Quote requestsQuote form → Service agreement template
Job applicationsApplication form → Offer letter template
Event registrationRegistration form → Waiver template → Auto-send
Rental agreementsBooking form → Rental agreement template → Auto-send
Service contractsOrder form → Service contract template
Vendor agreementsVendor intake form → Vendor contract template → Auto-send
Consent formsPatient/client form → Consent document template

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.


ComponentSupported Versions
Gravity Forms2.5+ (any license tier)
WPsigner1.5.0+
WordPress5.8+
PHP7.4+

IssueCauseSolution
No document created after submissionFeed not activeVerify the feed is enabled (green “Active” badge)
No document createdForm/template mismatchCheck that the form ID matches the feed configuration
Missing signer dataFields not mappedEnsure the signer Name and Email fields are mapped
Signer not receiving emailAuto-send disabledEnable “Auto-send” in the feed settings
Signer not receiving emailSMTP issueCheck your WordPress email configuration (use an SMTP plugin)
Sub-fields not appearingComplex field formatLook for labels like “Name (First)” in the field selector
”Gravity Forms is not installed”Plugin not activeInstall and activate Gravity Forms with a valid license from gravityforms.com
Rate limit exceededToo many rapid submissionsWait 60 seconds — limit is 10 documents/min per form

If documents are not being created, check the WordPress debug log:

  1. Enable debug logging in wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
  1. Check the log file at wp-content/debug.log
  2. Look for entries starting with [WPsigner GravityForms]