DirkScripts
Docs
Input
#lib.inputDialog
Open a form dialog with multiple inputs. Yields until submitted or cancelled.
lualocal values = lib.inputDialog('Create Report', { { type = 'input', label = 'Title', required = true }, { type = 'textarea', label = 'Description' }, { type = 'number', label = 'Priority', default = 1 }, { type = 'select', label = 'Category', options = { { value = 'bug', label = 'Bug' }, { value = 'feature', label = 'Feature' }, }}, }) if values then local title, desc, priority, category = table.unpack(values) end
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | yes | Dialog header |
| inputs | table[] | yes | Array of input definitions |
| options | table | no | { allowCancel = true, description, icon, prevContext, prevDialog } |
#lib.closeInputDialog
Programmatically close the input dialog.
lualib.closeInputDialog()
