# 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](/files/-LEkC36F3r1v1Dj3m87z)

This control is generally recommended over the [Checkbox Input Component](/form-runner/component/checkbox-input.md) 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.

[\[SINCE Orbeon Forms 2023.1\]](/release-notes/orbeon-forms-2023.1.md)

A "Clear value" button is available in Form Builder to clear the value of the control without editing the source of the form definition or recreating the control.

## Basic usage

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

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

## See also

* [Checkbox Input Component](/form-runner/component/checkbox-input.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.orbeon.com/form-runner/component/yesno-input.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
