Form helpers
FormField, FormSelect, and FormDateField connect native controls to the
Formik context supplied through their context prop. Render them inside the matching
Formik form, pass its context explicitly, and keep validation and submission logic in
the form that owns the fields.
import { FormikContext } from "formik";
import { FormDateField, FormField, FormSelect } from "@ovok/native/helpers";
<FormField name="email" context={FormikContext} label="Email" />
<FormSelect
name="language"
context={FormikContext}
label="Language"
options={languageOptions}
labelField="label"
valueField="value"
/>
<FormDateField name="dateOfBirth" context={FormikContext} label="Date of birth" />
| Component | Use |
|---|---|
FormField | Text input bound to a Formik field, with touched error display. |
FormSelect | Dropdown bound to a Formik field and an options array. |
FormDateField | Read-only text input that opens a native date/time picker. |
The controls rely on the SDK theme and translation context for styling and error messages. Confirm those providers are in place before using them outside SDK-owned screens.