Inputs
Checkbox

dialog refers to the return value of Dialog:Create

Checkbox

dialog:AddCheckbox creates a new color input field.

Parameters

dialog:AddCheckbox(label, description?, defaultValue?, required?)
NameTypeDescriptionRequired
labelstringThe title of the inputYes
descriptionstringThe description of the input fieldNo
defaultValuebooleanThe default value of the input fieldNo
requiredbooleanIf the value of the field should be valid and requiredNo

Example

client/example.lua
local dialog = Dialog:Create('Title');
 
dialog:AddCheckbox('Checkbox', 'Are cats cool?', true, true --[[Ensures that the box is checked]]);
 
local results = dialog:Open();
 
print(results[1]) -- If the box is checked or not