The built-in add form (spec/05 §6.8), "macaw.add_form": a form that adds a row to the
visitor's overlay of a source (spec/13 §3), its fields from the source's schema, of
kind :control, :pure (#453).
- parameters:
label(text,"Add a row"), the form's legend;submit(text,"Add"), its button's words;closed(text,"Rows can't be changed here."), what it says where the viewer may not change the rows or the mode takes no input; - declarations: the event
"add", its value the row, each field to its value; its placement's action names the source,%{on: "add", add: "birds"}; - fields (handed by the core,
@settings["fields"]): the source's schema's, its identity fields first and then the rest in name order, each%{"name", "label", "type", "options", "required", "value", "errors"}; a category with declared values is a native<select>, any other field a text input, so every value the visitor types reaches the server and is judged there; - refusals at their fields: each field's refusals in words under it, linked by
aria-describedby, the inputaria-invalid, and a summary of them first, arole="alert"list linking each to its field; the row's own refusals in the summary alone. The text the visitor entered is kept; - markup: live, a
<form phx-submit="mw-submit">(Macaw.State.submit/4reads it) with the event's payload in a hiddenmwand each fieldmw-row[<field>]; with no socket and the host's links, the same fields in a<form method="post">to the page's address (spec/13 §3.5); in:neutraland:print, and where the viewer may not change the rows, a paragraph ofclosed; - stylesheet:
stylesheet/0, served atstylesheet_path/0, its content address.
Summary
Functions
The add form's one static stylesheet: its fields, their refusals and its summary, every color a theme custom property with the default theme's value as its fallback.
The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).
Functions
@spec stylesheet() :: String.t()
The add form's one static stylesheet: its fields, their refusals and its summary, every color a theme custom property with the default theme's value as its fallback.
@spec stylesheet_path() :: String.t()
The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).