Input

Library
Updated 2 months ago · v1.3.7

lib.inputDialog

Open a form dialog with multiple inputs. Yields until submitted or cancelled.

lua
local 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
ParameterTypeRequiredDescription
titlestringyesDialog header
inputstable[]yesArray of input definitions
optionstableno{ allowCancel = true, description, icon, prevContext, prevDialog }

lib.closeInputDialog

Programmatically close the input dialog.

lua
lib.closeInputDialog()
Was this page helpful?
This page was last updated on 12 March 2026
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.