Post to a live page and swap only the marked element.
form: in an alcove makes it the front of a form. to names the page that receives it, and the posted values work on that page exactly like the query string, so the filters from the previous sections apply.
Mark an element with alcove-form="name" on both pages. The answer to the post is the page the form was sent from, with only that element replaced by the receiving page's version of it.
Here the form posts to this page itself. Search for a word: the list below the form changes, the rest of the page does not.
Live result This page is rendered on request.
A Christmas Carol Charles Dickens, 1843
Bleak House Charles Dickens, 1853
Emma Jane Austen, 1815
Ethan Frome Edith Wharton, 1911
Frankenstein Mary Shelley, 1818
Great Expectations Charles Dickens, 1861
Persuasion Jane Austen, 1817
Pride and Prejudice Jane Austen, 1813
The Age of Innocence Edith Wharton, 1920
The Death of Ivan Ilyich Leo Tolstoy, 1886
The Last Man Mary Shelley, 1826
War and Peace Leo Tolstoy, 1869
No title contains that.
Source the files behind the result above
content/alcoves/demo_booksearch/alcove.yaml
fields:
- name: q
type: text
form:
to: docs-forms
fields: [q]