Repository navigation
Import forms from WPForms - #6
Merged
Merged
Conversation
WPForms keeps each form as one JSON document in post_content, so the
importer decodes the post directly and works whether the plugin is
active, deactivated or deleted. The Lite/Pro line does not exist here:
phone, address, date-time, uploads, signatures, Likert grids and NPS
convert alongside the Lite fields, conditional logic comes across in the
two shapes that translate exactly (one AND group, or several single-rule
groups as ANY), payment choices keep their prices, and a payment total
becomes a real calculated total over the payment fields — the running
order total keeps running after the switch.
Smart tags rewrite onto merge tags ({field_id="1"} to {field:…},
{all_fields} and friends to their equivalents), notifications and
confirmations carry over with their own conditional logic, and an
unrecognised add-on field becomes a visible text field rather than
silently vanishing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second importer: WPForms — the second-largest install base among form plugins, and the one whose users lose the most when they switch, because conditional logic and payment fields are exactly what its paid tiers sell.
What it does
Forms → Import now shows a WPForms section beside the Contact Form 7 one, listing every
wpformspost on the site. WPForms keeps each form as one JSON document inpost_content, so the importer decodes the post directly — no WPForms classes, which means it works whether the plugin is active, deactivated, or already deleted. Each import creates a new AllTerrain form and never touches the original.What converts
simplebecomes a single text box;first-lastandfirst-middle-lastbecome the composite name field with the right parts), select/radio/checkbox with choices, number and number-slider (bounds included), phone, address, date-time (splitting into date, time or datetime by format), URL, password, hidden, file-upload (extensions → allowed filetypes), rating (scale → max), signature, page breaks, section dividers (→ heading), HTML blocks, GDPR checkbox (→ consent field, with its choice label as the consent line and required kept mandatory — GDPR consent must not become optional by import), Likert grids (rows + shared answer choices), and NPS (→ opinion scale 0–10 with its end labels).payment-multiple/payment-checkbox/payment-selectbecome choice fields whose choices carry aprice, andpayment-totalbecomes a real calculated total whose formula sums the payment fields — the running order total keeps running after the switch, through this plugin's own calculation engine. There's a test that submitsVIP + Parkingthrough the real engine and asserts 110.00 comes out.match: all, several single-rule groups →match: any. Anything mixed keeps its first group — deliberately narrowing the condition rather than widening it, because a field that shows too rarely is caught in testing and a field that shows to everybody is a leak. Operators map one for one (==,!=,c,!c,^,~,e,!e,>,<).{field_id="1"}(andfield_value_id/field_html_id) become{field:…};{all_fields},{admin_email},{site_name},{site_url},{page_url},{user_ip}and the date stamps become their equivalents; anything unknown is left visible in the editor rather than silently deleted.captchaandentry-previewhave no meaning here and are dropped; an unrecognised add-on field becomes a visible plain-text field, because reviewable beats vanished.Verification
wpformspost, including a broken-JSON post failing cleanly.show when f3 is Yes, prices[25, 100], total formula{f4},{field:…}tags in subject and reply-to — all verified in the stored schema.One more to go: Gravity Forms.
🤖 Generated with Claude Code
https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp