Defines a form field

The Field component sets the provided field name into the context so child components like input fields and labels can retrieve it and use it as the default field.

<Form for={%{}} as={:user}>
  <Field name={:email}>
    <div class="control">
      <TextInput value={@user["email"]}/>

# Public API

Name Description Type Values Default
name Required. The field name.

class The CSS class for the generated <div> element.