qb-input
qb-input opens a form and returns the submitted values or nil when it is closed. This page is
pinned to 379f8b74.
local result = exports['qb-input']:ShowInput({
header = 'Vehicle note',
submitText = 'Save',
inputs = {
{ text = 'Plate', name = 'plate', type = 'text', isRequired = true },
{ text = 'Priority', name = 'priority', type = 'number', default = 1 }
}
})
if not result then return end
TriggerServerEvent('myresource:server:saveNote', result.plate, tonumber(result.priority))The current field types are text, password, number, radio, checkbox, select, and
color. Fields use text, name, type, isRequired, default, and—where applicable—options.
Client-side required fields improve the form but do not replace server validation.
Source: official README