Define and manage the form
Like any other component, you can add a form to your custom component. To build a custom component form, Site studio provides an interface similar to components. In this UI you will be able to add fields and layout to your form. You are also able to add dropzones to your custom component.
To add a form to a custom component:
- Go to
admin/cohesion/components/custom-component-builder
and build your form - Export the
.json
file from the bottom of the page - Place that exported
.json
file alongside the YAML of your custom component - Add a form property to the YAML file with the path to the form json as a value
To edit a form of a custom component
- Go to the list of components and click edit on the custom component
- Change the form and export the
.json
file - Replace the form
.json
file of the custom component by the one you exported