Form
Forms are the most used standard to insert or update elements in a data base
Overview
The form component in Uncodie will help you handle all the necessary code to insert or update an element in your database.
Requirements
To use a form you need to set a query in your screen or page and pass some parameters for your database entry.
For more information on how to set a query see:
QueriesTo gather information from the user inputs see:
🔤VariablesSetup
Create a mutation for a collection in your database
Bind the values in your inputs to the parameters of your mutation
Select the layer or element you want to render as a form in Figma
In the plugin navigate to the Component section
Set the type to form
The mutation in the context of your form will be displayed automatically
Add a button to your form for the submit action
Compile and publish your project
Usage
Select this component to render a form element in your HTML DOM.
Rendered Element
<form> ... </form>
Considerations
When an element in Figma is set as Form, it is created as a new component, and if the element is within an instance of a component, the children of the parent instance will be overwritten.
Last updated
Was this helpful?