Get Form

A <form method="get"> for searches and filters that RizzyUI inputs work in. The inputs need a cascading EditContext; EditForm provides one but renders a POST form whose antiforgery token and _handler field would end up in the query string. RzGetForm provides the EditContext for its Model and renders a plain GET form.

Usage

Source
<RzGetForm Model="Filter" Action="/schedule" hx-get="/schedule/grid" hx-trigger="change" hx-target="#grid">
    <RzCheckboxGroup For="@(() => Filter.Tracks)">...</RzCheckboxGroup>
    <RzSwitch For="@(() => Filter.MyAgenda)" />
</RzGetForm>

Other attributes (hx-*, role, class) go on the <form>.

Parameters

  • Model (object, required): the model the inputs bind to with For.
  • Action (string?): the form's action; the current URL when not set.
  • ChildContent: the form content.