Radio button

To add radio buttons to the task, use the {{field type="radio" name="<filed ID>"}} component. Field ID must match the field name in the output data description. For example, a set of two radio buttons:

{{field type="radio" name="result" label="Yes" value="Yes" hotkey="1"}}{{field type="radio" name="result" label="No" value="No" hotkey="2"}}
Full list of parameters

Parameter

Description

Required

Default value

type

Field type: radio — Radio button.

yes

no

name

Field ID. Must match the field name in the output data description.

yes

no

label

Signature. For example, label="Yes".

no

no

value

The value to pass (written to the output file).

no

no

hotkey

The shortcut for selecting a value.

no

no

validation-show

The position of popup hints (displayed if the response didn't pass validation). The position is relative to the input field.

Supported values:

  • Above the input field: "top-left", "top-center", "top-right".

  • Below the input field: "bottom-left", "bottom-center", "bottom-right".

  • To the left of the input field: "left-top", "left-center", "left-bottom".

  • To the right of the input field: "right-top", "right-center", "right-bottom".

  • Don't display the message ("false").

no

"top-left"

checked

The state of radio button when the page is displayed:

  • checked=true — selected.

  • checked=false — deselected.

no

false

size

Size of the field.

Supported values: "M", "L".

no

"L"

width

Width of the field. Set in the following units:

  • Pixels. For example, width="100px".

  • Percentage of the size of the parent element. For example, width="100%".

You can also use a formula for setting the width. For example, width="calc(100%-30px)".

no

depends on the length of the signature

class

The CSS class for the field. For example, class="annotation".

no

".field" ".field_type_radio"

Add a field of string type into the output data description. For example:

{
  result": {
    "type": "string",
    "required": true
  }
}