Client
InputDialog
Yields until the player submits or cancels.
Parameters
titlestringfieldstable[]— each field is{ type, label, name, default, required, options, min, max, placeholder }type—text,password,number,checkbox,select,textarea,slider,color, ordate. Defaults totext. qb-input showsslider,textarea, anddateas text.name— key for the value in the result. Defaults tofield1,field2, and so on.options— forselect:{ { value, label } }or a list of strings
Returns
table|nil — each value by position and by name. nil when cancelled.
Example
local input = Bridge.InputDialog('Transfer', {
{ type = 'number', label = 'Amount', name = 'amount', required = true, min = 1 },
{ type = 'select', label = 'Account', name = 'account', options = { 'cash', 'bank' } },
})
if not input then return end
print(input.amount, input.account)