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:

Queries

To gather information from the user inputs see:

🔤Variables

Setup

  1. Create a mutation for a collection in your database

  2. Bind the values in your inputs to the parameters of your mutation

  3. Select the layer or element you want to render as a form in Figma

  4. In the plugin navigate to the Component section

  5. Set the type to form

  6. The mutation in the context of your form will be displayed automatically

  7. Add a button to your form for the submit action

  8. 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?