Gravity Forms Plugin Setup for WordPress
Gravity Forms is a paid plugin for creating forms of any complexity: from simple contact forms to multi-step surveys with conditional logic, calculators, and CRM integration. The standard for serious WordPress projects.
Installation
The plugin is downloaded from gravityforms.com (requires active license). After installation:
Settings → Gravity Forms → License Key → activate
License is tied to domain — when moving a site, deactivate on old domain.
Creating a Form
Forms → New Form — add title, drag fields from right panel. Fields are divided into groups:
- Standard — Text, Textarea, Select, Checkbox, Radio, File Upload
- Advanced — Name (splits into first/last), Email, Phone, Address, Date, Time, Website
- Pricing — Product, Quantity, Total, Coupon (for order forms)
- Post — Post Title, Post Body, Post Image (create posts via form)
Conditional Logic
One of the main reasons to choose Gravity Forms — flexible conditional logic. Fields, sections, "Next" buttons can show/hide depending on other field values:
Field "Issue Type": [Question / Complaint / Suggestion]
└── If "Complaint" → show field "Order Number"
└── If "Suggestion" → show field "Your Idea"
Similarly — conditional logic at notification level: email to sales manager is sent only if category selected is "Purchase".
Notifications
Each form has multiple notifications with different recipients:
Notifications → Add New
→ Send To: Field value (e.g., Email form field)
→ From Name: {Site Name}
→ Subject: New request: {form_title}
→ Message: {all_fields} — inserts all fields automatically
→ Conditional Logic: send only if Select field = "Purchase"
Merge tags {field_id:1} substitute specific field values into email subject, body, Reply-To.
Confirmations
After form submission — thank you page, redirect, or text message. Can set multiple confirmations with conditions:
Confirmation 1 (Default): show text "Thank you, we'll reply within an hour"
Confirmation 2 (VIP): if Email = *@bigclient.com → redirect to /vip-thank-you/
PHP API
// Get submission data by entry ID
$entry = GFAPI::get_entry( $entry_id );
echo $entry['1']; // value of field with ID=1
echo $entry['created_by']; // WordPress user ID
// Get all form entries
$entries = GFAPI::get_entries( $form_id, [
'status' => 'active',
'date_range' => [ '2025-01-01', '2025-12-31' ],
] );
// Add entry programmatically
$entry = [
'form_id' => 3,
'1' => 'John Smith',
'2' => '[email protected]',
'5' => 'Delivery question',
];
GFAPI::add_entry( $entry );
Hooks for Submissions
// Action after successful form submission (form ID=3)
add_action( 'gform_after_submission_3', function( $entry, $form ) {
// Send data to CRM
$name = rgar( $entry, '1' );
$email = rgar( $entry, '2' );
send_to_crm( compact( 'name', 'email' ) );
}, 10, 2 );
// Custom validation
add_filter( 'gform_validation_3', function( $validation_result ) {
$form = $validation_result['form'];
$phone = rgpost( 'input_4' );
if ( ! preg_match( '/^\+7\d{10}$/', $phone ) ) {
$validation_result['is_valid'] = false;
foreach ( $form['fields'] as &$field ) {
if ( 4 === $field->id ) {
$field->failed_validation = true;
$field->validation_message = 'Format: +7XXXXXXXXXX';
}
}
$validation_result['form'] = $form;
}
return $validation_result;
} );
Popular Add-ons
- Gravity Forms Stripe Add-On — accept payments directly in form
- Gravity Forms Zapier Add-On — integrate with thousands of services
- GravityView — display form entries on frontend (tables, cards)
- Gravity Forms + Custom Post Types — create CPT entries on form submission
Timeline
Setting up one form with notifications — several hours. Complex multi-step forms with conditional logic, calculators, CRM integration — 1–2 business days.







