1aa92d8d9d
Add generated field-error targets to the v0 add and rename forms so the canonical todo example shows recoverable typed form feedback end to end instead of emitting errors with no visible target. req: examples/001 req: canonical_authoring/003
15 lines
474 B
Plaintext
15 lines
474 B
Plaintext
<section data-hemx-root="todos">
|
|
<form data-hemx-handle="add_todo" data-hemx-form="new_todo">
|
|
<input name="title" required="required">
|
|
<button type="submit">Add</button>
|
|
<p data-hemx-error-for="title"></p>
|
|
</form>
|
|
<p data-hemx-slot="summary">{+ self.summary +}</p>
|
|
<p data-hemx-slot="notice">{+ self.notice +}</p>
|
|
<ul data-hemx-slot="todo_row">
|
|
<template h-for="row in &self.rows" h-key="row.id">
|
|
{+ row +}
|
|
</template>
|
|
</ul>
|
|
</section>
|