Input Dialog
The input dialog window allows you to take data from the user by setting input fields.
lib.inputDialog
heading:
string
rows:
string[]
ortable
(array
)type:
'input'
or'number'
or'checkbox'
or'select'
or'slider'
or'color'
or'multi-select'
or'date'
or'date-range'
or'time'
or'textarea'
options?:
table
(object
)allowCancel:
boolean
If true the user will not be able to cancel and close the input dialog until submitted.
Available properties per field type:
input
label:
string
description?:
string
placeholder?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
string
password?:
boolean
min?:
number
max?:
number
number
label:
string
description?:
string
placeholder?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
number
min?:
number
max?:
number
checkbox
label:
string
checked?:
boolean
disabled?:
boolean
required?:
boolean
select and multi-select
label:
string
options:
table
(array
)value:
string
label?:
string
description?:
string
placeholder?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
string
value of the default option.
clearable?:
boolean
slider
label:
string
placeholder?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
number
min?:
number
max?:
number
step?:
number
color
label:
string
description?:
string
placeholder?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
string
format?:
'hex'
|'hexa'
|'rgb'
|'rgba'
|'hsl'
|'hsla'
;
date
label:
string
description?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
string
ortrue
True defaults to current date
format?:
string
Date format to display in the field
clearable?:
boolean
date-range
label:
string
description?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
[string, string]
format?:
string
Date format to display in the field
clearable?:
boolean
time
label:
string
description?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
string
format?:
'12'
or'24'
clearable?:
boolean
textarea
label:
string
description?:
string
placeholder?:
string
icon?:
string
required?
boolean
disabled?:
boolean
default?:
number
min?:
number
Minimum amount of rows the text area will take.
max?:
number
Maxmimum amount of rows the text area will take, when exceeded goes into overflow.
autosize?:
boolean
If true text area will grow with content until max rows are reached.
The callback data is promise based meaning that the thread will not continue executing until the user either sends the data or exits the popup.
The data returned will be a table (array), indexes represent the rows sent to the dialog, so if we want data from the first field that would be index 1
(0
), if we want data from the third field, that would be index 3
(2
), etc...
lib.closeInputDialog
Force closes the active input dialog and sets its return data as nil
Usage Example
Basic
Advanced
Last updated