Form
object FormConstructors and rendering helpers for lower-level Form values.
Defined by scalive.Form. View source (scalive/api/src/scalive/forms/Form.scala:269-346)
Methods2
http
def http[Msg](target: FormAction)(mods: |[Mod[Msg], IterableOnce[Mod[Msg]]]*): HtmlElement[Msg]Renders an ordinary HTML form with the action and method owned by target.
mods may contain individual modifiers or collections of modifiers. The target owns the
transport attributes; directly supplying an action or method attribute, with any letter
case, is rejected. LiveView bindings and phx-trigger-action are not added automatically.
A checked POST action is marked for CSRF-token injection during Scalive rendering. Checked GET actions and all unsafe actions are not marked. Token injection also requires rendering in a lifecycle with configured CSRF state; this helper alone does not make a request secure.
Throws
IllegalArgumentExceptionif a directly supplied modifier sets
actionormethod
Defined by scalive.Form.http. View source (scalive/api/src/scalive/forms/Form.scala:289-311)
of
def of[A](name: String, event: FormEvent[A], codec: FormCodec[A]): Form[A]Creates a lower-level form from a typed event.
The event is converted to state without decoding it again.
Defined by scalive.Form.of. View source (scalive/api/src/scalive/forms/Form.scala:343-344)
def of[A](name: String, state: FormState[A], codec: FormCodec[A]): Form[A]Creates a lower-level form from a parsed root name and existing state.
No decoding or ownership validation occurs until a relevant operation is requested.
Defined by scalive.Form.of. View source (scalive/api/src/scalive/forms/Form.scala:336-337)