dialog refers to the return value of Dialog:Create

Input

dialog:AddSelect creates a new input field in which you can select one of the specified options.

Parameters

dialog:AddSelect(label, description?, placeholder?, values?, required?)
interface SelectValue {
	label?: string;
	value: string;
}
NameTypeDescriptionRequired
labelstringThe title of the inputYes
descriptionstringThe description of the input fieldNo
placeholderstringThe placeholder of the input fieldNo
valuesSelectValue[]The selectable valuesYes
requiredbooleanIf the value of the field should be valid and requiredNo

Example

client/example.lua
local dialog = Dialog:Create('Title');
 
dialog:AddSelect('Selection', 'Which cat breed do you like best?', 'Choose a mega cool cat breed.', {
  {
    label = 'British Short Hair',
    value = 'br_sh_hair'
  },
  {
    label = 'Tiger',
    value = 'tiger'
  }
});
 
local results = dialog:Open();
 
print(results[1]) -- The value of the selected option