🦞 igor-claw: fix Create Form recipe's identifier guidance for choice/date fields - #824
Open
ayal wants to merge 1 commit into
Open
🦞 igor-claw: fix Create Form recipe's identifier guidance for choice/date fields#824ayal wants to merge 1 commit into
ayal wants to merge 1 commit into
Conversation
Contributor
❌ EvalForge YAML Gate: Missing CoverageThese changed docs have no covering YAML scenario for their area (scenarios for other areas do not count):
|
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.
Problem
The Create Form recipe's own recommended pattern for choice/date fields causes the exact bug it warns about. It instructs setting
identifier: "TEXT_INPUT"forRADIO_GROUP/DROPDOWNfields (Field Types Reference table + "Choice fields" example), and doesn't coverDATE_INPUT/DATE_PICKERat all.Live-verified on
wix.form_app.formvia Create Form: the Form Schemas API (form-schema-service) derives a field's renderedcomponentTypeon every subsequent read from itsidentifierstring, matched against an internal fixed allow-list — completely independent of thecomponentTypeactually set in the request. Following the recipe's own guidance (identifier: "TEXT_INPUT"+componentType: "RADIO_GROUP") makes the field's own create response immediately showcomponentType: "TEXT_INPUT", discardingradioGroupOptions— no error, HTTP 200. Settingidentifierto match the componentType instead ("RADIO_GROUP","DROPDOWN","DATE_INPUT") reproducibly fixes it.This is the root cause of an MCP feedback report where an agent built a lead-capture form with a dropdown "Preferred Campus" field and a "Date of Birth" field; both silently reverted to
TEXT_INPUTafter creation, and the DOB field'svalidation.formatbecame immutably stuck atDATEeven though its rendered type was lost.Solution
identifiermatchingcomponentType(RADIO_GROUP/DROPDOWN) instead of"TEXT_INPUT".identifier-must-match-componentTyperule.identifierdoesn't just risk a fallback, it unconditionally coerces the field toTEXT_INPUT(or drops it ifidentifieris fully custom).Considerations - important facts the reviewer should know
componentTypebased on an undocumentedidentifierallow-list instead of erroring) is a real API bug being raised separately with the Forms team — this PR only fixes the recipe so agents following it stop reproducing that bug.appDefId(14ce1214-...) — that's already tracked by open PR 🦞 igor-claw: fix wrong Wix Forms appDefId in Create Form recipe #658.