Forms
If you want to let people add or change items in your Products table, you need a form. Forms make it easy for anyone to fill in the details, like a product's name or price, without touching the code.
Snappy gives you a ready-made form called BobForm. You just tell it what kind of data you want to work with (like products), and then add fields for each thing you want to collect.
Here’s how you do it:
<BobForm flavor="products">
<BobTextField label="Name" prop="name" />
<BobNumberField label="Price" prop="price" prefix="USD" />
</BobForm>
What does this mean?
BobFormis the main form. Theflavortells it you’re working with products.BobTextFieldadds a box where you can type the product name.BobNumberFieldadds a box for the price. The word "USD" shows up before the number so you know it’s money.
When you put this on your page, you’ll see a simple form. You can use it to add new products or change existing ones, and everything updates in your Products table automatically. No need to worry about saving or connecting things—it just works!