A block of options that allows selecting only one of them at a time.
To add the radio button control to the lightbox, follow these steps:
1) Add a section to the lightbox configuration:
var opts = [
{key: 1, label: "High"},
{key: 2, label: "Normal"},
{key: 3, label: "Low"}
];
gantt.config.lightbox.sections = [
{name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
{name: "priority", height: 22, map_to: "priority", type: "radio", options: [opts]}, {name: "time", type: "duration", map_to: "auto"}
];
2) Set a label for the section:
gantt.locale.labels.section_priority = "Priority";
The following properties are mostly important and commonly set for the radio button control (see the full list here):
Generally, to set values for the radio button control, use the options parameter:
gantt.config.lightbox.sections = [
{name: "priority", map_to: "priority", type: "radio", options: [
{key: 1, label: "High"},
{key: 2, label: "Normal"},
{key: 3, label: "Low"},
]}
];
Items in the options parameter have 2 mandatory properties: