Home App Docs Blog Github

Drag and Drop Data Binding

How do I bind the content of a text box in the Visual Editor to the value of one of the custom fields for that same content item? Do I have to make a separate Builder API call to get the content fields?

Or should I not bother with the custom fields, and instead use a template for the fields that I want to standardize the appearance of? I want to be able to use the same fields for a formatted content index page.

Or should I lay out my React Page to use the content fields and the visual editor content together, requesting both in separate calls to Builder.

You can bind to any custom field using context.builderContent

For example, if you have a custom field called title, you’ll need to bind to context.builderContent.data.title

Thanks aziz. That was really helpful.

And…if I have a field which is a reference to an item in another content type? For instance I want to get the fullname of an author which is associated with a blog article? I see the author shows up an object: _app.js:1 {@type: “@builder.io/core:Reference”, id: "06b3e264ec59403daedca3ec8db5} do I have to make a content API call to get the related data?

Hey Alex,

Just wanted to add a response to this message as well, though I know we continued the conversation in another thread. We’ll keep you updated when the fix is released, thanks!