value
attributes via the Embed.You're looking to auto-populate a form field using CMS data in Webflow, which isn't supported natively but can be done with custom code inside an Embed element on a CMS Collection Page.
In your Embed element, insert something like:
<input type="text" name="project-name" value="{{wf {"path":"name","type":"PlainText"} }}">
Webflow will render the CMS value into the value
attribute.
Replace "name"
with the field slug (e.g., title
, client-name
, category
).
Important: You can use Webflow’s Add Field button inside the Embed window to insert CMS bindings correctly, rather than manually typing JSON syntax.
To keep auto-filled fields hidden (e.g., you're sending data without user editing), add this to the same Embed:
<input type="hidden" name="project-id" value="{{wf {"path":"_id","type":"PlainText"} }}">
This lets you submit static CMS-related data in the form submission.
If you're working outside of a CMS Template Page (e.g., on a static page with a Collection List), direct CMS binding in Embed Code won’t work. Instead:
data-*
attribute to a visible element using a Text Block with CMS data, then inject that into your form later using document.querySelector()
and input.value
.To auto-populate a form field with CMS content in Webflow:
value
attributes to CMS fields using Webflow’s field binding.This method is reliable and still works in 2024.