Visual Builder forms are incomplete when fetched with @optimizely/cms-sdk
Visual Builder forms are incomplete when fetched with @optimizely/cms-sdk
In Optimizely SaaS CMS, Visual Builder forms work in the editor, but the content JS SDK (@optimizely/cms-sdk) does not return everything needed to render them on the site.
When a Form Container is placed on an Experience, the SDK query does not go deep enough to include the fields inside the form (step → row → column → elements). Form Container properties set in CMS — Title, Description, Submit URL — are also missing from the response.
As a result, forms cannot be implemented with the SDK as-is. We had to patch the SDK locally so the same content query returns the full form.
Steps to reproduce:
- Activate Forms in CMS (SaaS) and create a Form Container with at least one step, row, column, and form elements (e.g. Textbox, Submit).
- Set Form Title, Description, and Submit URL on the Form Container.
- Add the form to an Experience.
- Fetch the Experience with @optimizely/cms-sdk (getContentByPath / standard composition query) and render it.
Expected: The SDK returns the full form: layout, all form elements, and Form Container properties (Title, Description, Submit URL), so the frontend can render and submit the form with no extra query.
Actual: Form elements inside columns are missing. Title, Description, and Submit URL are not returned. Only structure metadata (e.g. displayName) is available.
Impact: Teams using the official content JS SDK cannot ship Visual Builder forms without patching the SDK or writing a custom Graph query. That is not a supported, upgrade-safe path.
Request:
Make the SDK composition query deep enough for the form structure: experience → form → step → row → column → elements.
Return Form Container properties (Title, Description, Submit URL, confirmation messages) on the form node, the same way other component properties are returned.
Document the supported way to render and submit SaaS Visual Builder forms with @optimizely/cms-sdk.