docs/versioned_docs/version-2.39.0/how-to/use-form-component.md
In this guide, we'll create a simple app that uses a Form component to add records to a database. We'll use ToolJet Database as our data source.
</div> <div style={{paddingBottom:'24px'}}>name, quantity and price.name and two Number Inputs for quantity and price.Run this query on application load? to automatically run the query when the app startsData property, paste the below code:{{queries.getProducts.data}}
{{components.form.data.nameInput.value}}
{{components.form.data.quantityInput.value}}
{{components.form.data.priceInput.value}}
To ensure the Table component updates with new data after adding products, trigger the getProducts query following each addProduct query execution. Here's how:
<i>This process refreshes the Table component with the latest data from the database.</i>
Button To Submit Form as submitButton.Now if you enter the product data on the form and click on Submit. The addProduct query will run and the entered data will be written to the products table in the ToolJet Database.
In this how-to guide, we have explored a practical application of the Form component in ToolJet. You can apply the same principles for a variety of use cases that requires data input from the end-user.
</div>