Skip to content

Add JetFormBuilder form integration#194

Merged
davidperezgar merged 4 commits into
trunkfrom
claude/add-jetformbuilder-integration-zJdo3
May 17, 2026
Merged

Add JetFormBuilder form integration#194
davidperezgar merged 4 commits into
trunkfrom
claude/add-jetformbuilder-integration-zJdo3

Conversation

@davidperezgar
Copy link
Copy Markdown
Contributor

Summary

Adds native FormsCRM integration for JetFormBuilder, enabling form submissions to be automatically sent to connected CRM/ERP systems.

Key Changes

  • New form integration class (FORMSCRM_JetFormBuilder) that:

    • Registers a meta box on JetFormBuilder form editor for per-form CRM settings
    • Supports dynamic CRM credential fields (URL, username, password, API key, etc.) based on selected CRM type
    • Provides field mapping UI to connect JetFormBuilder form fields to CRM module fields
    • Hooks into jet_fb_on_success action to process form submissions and send data to the CRM
    • Handles both JFB 2.x (two-arg) and 3.x (single-arg) action signatures for compatibility
  • Field extraction from JetFormBuilder's Gutenberg block structure:

    • Recursively parses form post content to discover all jet-forms/* field blocks
    • Supports both name and fieldName block attributes for field identification
  • Dynamic value substitution using {id:field_name} shortcode syntax in field mappings

  • Error handling that logs CRM submission failures to the error log without blocking form submissions

  • Conditional loading in loader.php — integration only loads when JetFormBuilder plugin is active

Implementation Details

  • Follows FormsCRM's standard CRM integration pattern: per-form settings stored as post meta, field mapping via fc_crm_field-* keys
  • Reuses existing CRM library infrastructure (formscrm_get_api_class(), formscrm_render_connection_status(), etc.)
  • Supports expert mode to show all CRM fields
  • Enqueues admin stylesheet on form edit screen for consistent UI with other form integrations
  • Properly sanitizes and validates all user input; uses nonces for settings save

https://claude.ai/code/session_01AoKC9VjVP97Mw1YZ5fYPs6

claude and others added 4 commits May 12, 2026 21:38
Adds FORMSCRM_JetFormBuilder class that registers a FormsCRM meta box
on the jet-form-builder post type, persists per-form CRM settings as
post meta, parses Gutenberg blocks to list available form fields, and
hooks into jet_fb_on_success to push mapped field data to the configured
CRM. Errors are caught and routed to the FormsCRM Error Log without
surfacing to the end user. The class is conditionally loaded in loader.php
when jetformbuilder/jet-form-builder.php is active.

https://claude.ai/code/session_01AoKC9VjVP97Mw1YZ5fYPs6
@davidperezgar davidperezgar merged commit 6b7284c into trunk May 17, 2026
6 checks passed
@davidperezgar davidperezgar deleted the claude/add-jetformbuilder-integration-zJdo3 branch May 17, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants