dialog refers to the return value of Dialog:Create
Input
dialog:AddPasswordInput creates a new text input field whose content can be made invisible or invisible by pressing a button.
Parameters
dialog:AddPasswordInput(label, description?, placeholder?, values?, defaultValue?, min?, max?, required?)| Name | Type | Description | Required |
|---|---|---|---|
| label | string | The title of the input | Yes |
| description | string | The description of the input field | No |
| placeholder | string | The placeholder of the input field | No |
| defaultValue | string | The default value of the input field | No |
| minLength | number | The maximal length of the text | No |
| maxLength | number | The minimal length of the text | No |
| required | boolean | If the value of the field should be valid and required | No |
Example
client/example.lua
local dialog = Dialog:Create('Title');
dialog:AddPasswordInput('Password', 'The password for the cat coffee', 'Enter the top secret password!');
local results = dialog:Open();
print(results[1]) -- The entered text