# Yes/No answer

## Availability

\[SINCE Orbeon Forms 2016.1]

## What it does

The `fr:yesno-input` component displays a simple choice between "Yes" and "No". It stores a value of `true` when "Yes" is selected and `false` when "No" is selected.

![Appearance](https://4129616727-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LEkBiSDvlXs3VWiO0Zu%2F-LEkBmMpnaxnftLGDglW%2F-LEkC36F3r1v1Dj3m87z%2Fxbl-yesno-input.png?generation=1528743350480727\&alt=media)

This control is generally recommended over the [Checkbox Input Component](https://doc.orbeon.com/~/revisions/-LF_uc1WMpa4Sd-n5tDb/form-runner/components/checkbox-input) for binary (or boolean) selection, because:

* A "Yes/No" choice is usually clearer to the user.
* The control can be marked as "Required", in which case he user has to make a selection to pass validation. With a single checkbox, it is easier to miss making a selection.

## Basic usage

You use `fr:yesno-input` like a regular XForms controls. Example:

```markup
<fr:yesno-input ref="happy-camper">
    <xf:label>Are you a happy camper?</xf:label>
</fr:yesno-input>
```

## See also

* [Checkbox Input Component](https://doc.orbeon.com/~/revisions/-LF_uc1WMpa4Sd-n5tDb/form-runner/components/checkbox-input)
