Todo App
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-Session Data
Each visitor gets their own todo list. A hidden _session_id field stamps ownership on each item.
filter="_session_id=#session.id#"
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
Source
Loading...