Sync CaptainForm submissions to Google Sheets
CaptainForm renders inside a cross-origin iframe from 123FormBuilder's cloud. Since the SDK cannot access cross-origin iframes, use CaptainForm's webhook integration to send submissions to your LeadToSheet endpoint for reliable Google Sheets sync.
CMS: WordPress
Overview
CaptainForm, now part of 123FormBuilder, builds forms in an external dashboard and embeds them on WordPress through an iframe. Because submissions happen inside the iframe, traditional JavaScript hooks miss them. Since CaptainForm renders inside a cross-origin iframe, the SDK cannot capture submissions directly. Use CaptainForm's webhook integration to send submissions to your LeadToSheet endpoint for reliable capture.
Implementation checklist
- 1
Add the LeadToSheet snippet to your theme
Inject the script in your WordPress footer via a header/footer plugin or your theme's functions.php. Since CaptainForm renders in a cross-origin iframe, the SDK cannot capture submissions directly. Configure the webhook integration described below for reliable capture.
LeadToSheet snippet
<script>(function(w,d,s,u,k,e){if(w.__formsync){return}w.__formsync={q:[],k:k,endpoint:e};var js=d.createElement(s);js.src=u;js.async=1;js.onload=function(){w.__formsync.init&&w.__formsync.init({ clientKey:k })};d.head.appendChild(js);})(window,document,'script','https://www.leadtosheet.com/sdk.min.js','YOUR_CLIENT_KEY','https://www.leadtosheet.com/api/ingest');</script> - 2
Configure webhook fallback for iframe forms
Since CaptainForm renders inside a cross-origin iframe, the SDK cannot capture submissions directly. Set up 123FormBuilder's webhook integration to send submissions to your LeadToSheet endpoint as a reliable fallback.
Tip: CaptainForm uses the same embed domain as 123FormBuilder, so one webhook configuration covers both.
- 3
Submit a test entry through the live embed
Fill out the CaptainForm on your WordPress page and confirm the row appears in your connected Google Sheet with all field names intact.
Customization ideas
Map cloud form fields to Sheet columns
CaptainForm field names come from the 123FormBuilder dashboard. Rename columns in your Google Sheet once and future entries follow the same mapping.
Route by form template
If you use multiple CaptainForm templates on different pages, configure routing rules in the LeadToSheet dashboard to send entries to separate Sheet tabs based on page URL.
Pair with payment confirmation emails
CaptainForm supports payment fields via 123FormBuilder. Use Apps Script on your Sheet to trigger confirmation emails when a payment row arrives.
Troubleshooting
Iframe submissions not captured
Since 123FormBuilder renders inside a cross-origin iframe, the SDK cannot capture submissions directly. Set up 123FormBuilder's webhook integration to send submissions to your LeadToSheet endpoint as a reliable fallback.
Field names appear as generic IDs
CaptainForm assigns internal IDs to fields. Rename them inside the 123FormBuilder dashboard under field settings to get human-readable Sheet headers.
Caching plugin stripping the script
Some aggressive caching plugins (WP Rocket, W3 Total Cache) strip inline scripts. Add the LeadToSheet CDN domain to your cache exclusion list.
Resources
Frequently asked questions
- Does LeadToSheet work with the legacy CaptainForm plugin?
- Yes. The legacy CaptainForm plugin and the newer 123FormBuilder plugin both render the same iframe embed, CaptainForm forms render inside a cross-origin iframe, so the SDK relies on the webhook integration for submission capture. For iframe-embedded forms, use the webhook fallback.
- Will CaptainForm's built-in email notifications still fire?
- Yes. LeadToSheet operates independently from 123FormBuilder's server-side email or webhook notifications. Since CaptainForm renders in a cross-origin iframe, the SDK relies on the webhook integration for data capture, which does not affect 123FormBuilder's own notification settings.
- What form field types does LeadToSheet capture?
- LeadToSheet captures text-based form fields such as text inputs, dropdowns, checkboxes, radio buttons, and textareas. Fields that are not text-based, such as file uploads, are processed server-side by 123FormBuilder and are not captured by the SDK.
