Radio

The Radio field is an excellent way to present a set of choices for users to select from.

radio1

Attributes

AttributesTypeRequiredDescription
idstringRequiredUnique ID identifying the field. It will be used as meta_key. Must be different from all other field IDs.
titlestringRequiredDisplays title of the option.
subtitlestringOptionalSubtitle display of the option, situated beneath the title.
descstringRequiredDescription of the option, appearing beneath the field control.
typestringRequiredValue identifying the field type. For Radio field we set value radio
defaultstringOptionalValue indicated the key value of the options array to set as default.
colintOptionalThe proportion of columns that display field on 12 columns per row.
optionsarrayOptionalArray of key pair values representing the radio buttons. The sequential value accepts the text to display beside the radio button.
datastringOptionalSets the radio option values with WordPress data.  Accepts: sidebar menu taxonomy post_type
value_inlinestringOptionalSets the value options in a line
data_argsarrayOptionalWordPress arguments specific to the specified data.

Example Declaration