Basic form
Creating a form page and storing data on the interface
In the Backend tab. Create the table where the data will be stored.

Add a
complete
flag where you know if there this form was sent
Adding the product table

Adding some mock data for the products table

Create the product list query

In the Frontend tab, create a variable to store the form data

Add the inputs

Link each input to the variable

Add the relationship column
.gif?alt=media&token=e27b40f9-ec98-4652-b74e-f99d64e91da4)
Create a variable to store the options

Get the list of products on page start


Code of mapping:
$.products.map(p => ({value: p.id, label: p.name}))
To check if is everything alright, test it in the preview mode

Create the query to insert the data in the database

Code of query:
insert into "order"
(email, amount, product_id)
select
email, amount, product_id
from json_populate_record(null::"order", $1)
To fininish, let's add the button action

Last modified 1yr ago