# Questionnaire forms

Canonical page: https://docs.ovok.com/native-sdk/guide/modules/questionnaire-response-form

Use `QuestionnaireForm` to render a FHIR `Questionnaire` as a form. The module
supports paged navigation, conditional items, defaults, validation, and submission
callbacks. It does not choose which questionnaire a patient may complete or decide
how your application stores the response.

```tsx
import { QuestionnaireForm } from "@ovok/native/questionnaire-response-form";

<QuestionnaireForm
  questionnaire={questionnaire}
  onSubmit={async (values) => saveResponse(values)}
>
  <QuestionnaireForm.Header>
    <QuestionnaireForm.Header.Title />
    <QuestionnaireForm.Header.Subtitle />
  </QuestionnaireForm.Header>
  <QuestionnaireForm.Content>
    <QuestionnaireForm.Content.Item />
    <QuestionnaireForm.Content.Error />
  </QuestionnaireForm.Content>
  <QuestionnaireForm.Navigation>
    <QuestionnaireForm.Navigation.PreviousButton />
    <QuestionnaireForm.Navigation.NextButton />
    <QuestionnaireForm.Navigation.SubmitButton />
  </QuestionnaireForm.Navigation>
</QuestionnaireForm>
```

Use the validation and navigation components that match the questionnaire flow, and
handle submission errors at the screen boundary. If the SDK is configured to create
a FHIR `QuestionnaireResponse`, review that behavior and the resulting resource before
using it as the persisted clinical record. Do not treat hidden conditional questions
as answered.

After a required-field or answer-validation message appears, it clears when the
enabled questionnaire items become valid. If saving then fails, the save error takes
precedence and `QuestionnaireForm.Content.Error` shows its retry button; retrying
submits the current form values again.

## References [#references]

- [QuestionnaireForm and compound children](/native-sdk/guide/components/questionnaire-response-form/)
- [Providers, hooks, and submit utilities](/native-sdk/guide/components/questionnaire-response-form/advanced-api/)
- [Questionnaire component references](/native-sdk/guide/components/questionnaire-response-form/content/)

## API reference [#api-reference]

Every export of `@ovok/native/questionnaire-response-form`, with signatures, props and types, is in the [`questionnaire-response-form` API reference](/native-sdk/reference/questionnaire-response-form).
