Full create, read, update, delete — from HTML forms, no backend code.
Declare a fetch.* directive in the <what> block. The local: prefix queries your configured database. The result is available as a template variable.
<what>
fetch.notes = "local:notes?sort=created_at:desc&limit=20"
</what>
<loop data="#notes#" as="note">
<div>#note.title#</div>
</loop>
Use action="/w-action/notes" with method="post" to insert a new record. The form fields become the record's columns.
Records are fetched via fetch.notes = "local:notes" in the <what> block at the top of this page.
| Action | Form action | Method |
|---|---|---|
| Create record | /w-action/notes |
POST |
| Update record | /w-action/notes/#id# |
POST |
| Delete record | /w-action/notes/#id#/delete |
POST |
<!-- Sort, filter, search, paginate -->
fetch.notes = "local:notes?sort=created_at:desc&limit=10&offset=0"
fetch.active = "local:items?filter=status:active"
fetch.results = "local:posts?search=hello"
fetch.name = "local:collection" queries your SQLite database#name# and iterated with <loop>POST /w-action/collection — form fields become columnsPOST /w-action/collection/#id#POST /w-action/collection/#id#/deletesort, filter, search, limit, offset