nova_forms

Function NovaForm

Source
pub fn NovaForm<ServFn, L, K>(
    props: NovaFormProps<ServFn, L, K>,
) -> impl IntoView
where ServFn: DeserializeOwned + Serialize + ServerFn<InputEncoding = PostUrl, Error = NoCustomError, Output = ()> + 'static, <<ServFn::Client as Client<ServFn::Error>>::Request as ClientReq<ServFn::Error>>::FormData: From<FormData>, L: Locale + 'static, <L as FromStr>::Err: Debug, K: LocaleKeys<Locale = L> + 'static,
Expand description

Creates a new nova form. The form will automatically handle validation, serialization, and submission. This implicitly creates a HTML form tag that contains your entire form. It also provides a toolbar with a page select, locale select, preview button, and submit button.

§Required Props

  • on_submit: [Action<ServFn, Result<(), ServerFnError>>]
    • The server function that will be called when the form is submitted.
  • bind: impl Into<QueryString>
    • The query string that binds the form to the form data.
  • bind_meta_data: impl Into<QueryString>
    • The query string that binds the form to the metadata.
  • i18n: I18nContext<L, K>
    • The i18n context. This is used to set the locale of the form in the toolbar.
  • children: Children
    • The content of the form.

§Optional Props