Gravity Forms
Gravity Forms (plugins/gravityforms/) is the primary form-building solution for the Dealers Site. It powers dealer registration, contact forms, feedback forms, and credit applications.
Used Forms
| Form | Purpose |
|---|---|
| Dealer Application | Prospective dealer onboarding — captures company and contact info |
| Contact Us | General dealer inquiries |
| Feedback | Post-order feedback collection |
| Apply | Credit/net-terms application |
reCAPTCHA Integration
The gravityformsrecaptcha add-on adds Google reCAPTCHA to Gravity Forms to prevent spam submissions.
The theme optimises performance by only loading reCAPTCHA scripts on pages that use Gravity Forms:
$allowed_gf_pages = ['contact-us', 'feedback', 'apply'];
if ( ! is_page( $allowed_gf_pages ) ) {
wp_deregister_script( 'gforms_recaptcha_recaptcha' );
wp_dequeue_script( 'gforms_recaptcha_recaptcha' );
}
This prevents reCAPTCHA scripts from loading on every page and slowing down the browse experience.
Admin Styles
The WooCommerce\Order module removes conflicting Gravity Forms admin styles on the WooCommerce orders list page to prevent layout issues:
$this->add_action( 'admin_enqueue_scripts', 'remove_gf_styles', 99 );
Configuration
Forms are configured in WP Admin → Forms. Each form supports:
- Multi-page forms
- Conditional logic
- Custom confirmation messages / redirect URLs
- Email notifications to admins and dealers
- Webhook notifications (for CRM integrations)
Klaviyo Integration
The Suma Elementor KlaviyoCreateProfile class (inc/class-klaviyo-create-profile.php) can trigger a Klaviyo profile creation event when a dealer registers via a Gravity Form, syncing new dealer contacts to the Klaviyo email marketing list.