Todo App
A full CRUD app with validation, inline updates, and per-session data. Zero custom JavaScript.
☑
No todos yet. Add one above!
How It Works
Inline Updates
Forms use w-target and w-swap to replace the todo list in-place without a full page reload.
w-target="#todo-list" w-swap="innerHTML"
Per-Visitor Ownership
The todos collection declares an owner policy. The framework stamps each item's owner on create and enforces it — you only see and modify your own todos, even by id.
[collections.todos] read = "owner"
Validation
The w-validate attribute enables client-side validation. Rules are declared with HTML attributes like w-required.
<input w-required w-min="1" w-max="200">
Server Partials
Action handlers render a partial template and return HTML directly. The client swaps it into the target element.
<input type="hidden" name="w-partial" value="todo-list">
Source Code
The app uses two files:
Page
site/demo/apps/todo.html
— form, layout, documentation
Partial
partials/todo-list.html
— todo list loop, inline swappable