From b90463b7d2af7f6cc81b8500cd4355fa21649d49 Mon Sep 17 00:00:00 2001 From: "Mr.Crowley" Date: Tue, 24 Feb 2026 00:53:37 -0600 Subject: [PATCH 1/2] issue with qb-input checkboxes qb-input was not returning multiple checkboxes correctly. The issue was that the returned data was being overwritten by other return values. example: ```lua local input = { { type = 'input', label = Locale("whitelist.label"), description = Locale("whitelist.description"), required = true, }, { type = 'checkbox', label = Locale("can_whitelist.label"), required = false, }, { type = 'checkbox', label = Locale("whitelist_temp_access.label"), required = false, } } ``` Previously, one of the checkbox values would get overridden. The same issue occurred when using .options. --- modules/input/_default/client.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/input/_default/client.lua b/modules/input/_default/client.lua index d3e6a8f..371db88 100644 --- a/modules/input/_default/client.lua +++ b/modules/input/_default/client.lua @@ -87,10 +87,10 @@ function OxToQBInput(data) input.options = {} if v.options then -- Checks if options varible is valid so checkboxes are bundled together (not used by ox for each checkpoint) for k, j in pairs(v.options) do - table.insert(input.options, {value = j.value, text = j.label, checked = j.checked}) -- added checked option (used to show box as ticked or not) + table.insert(input.options, {value = #returnData + #input.options + 1, text = j.label, checked = j.checked}) -- added checked option (used to show box as ticked or not) end else -- If options is not valid or people pass a single checkbox then it will be a single checkbox per entry - table.insert(input.options, {value = v.value, text = v.label, checked = v.checked}) -- Kept value just incase it's used for other stuffs + table.insert(input.options, {value = #returnData + 1, text = v.label, checked = v.checked}) -- Kept value just incase it's used for other stuffs end end table.insert(returnData, input) From 0088559b912ca6eb6745c34fadedda0c251c8dcd Mon Sep 17 00:00:00 2001 From: "Mr.Crowley" Date: Tue, 24 Feb 2026 01:14:50 -0600 Subject: [PATCH 2/2] qb also returns strings for some reason qb returns "true" or "false" instead of true or false for checkbox's and probably other stuff. Converting to bools to be consistent with ox's returns --- modules/input/qb-input/client.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/input/qb-input/client.lua b/modules/input/qb-input/client.lua index 3742d57..d9dcd5e 100644 --- a/modules/input/qb-input/client.lua +++ b/modules/input/qb-input/client.lua @@ -33,6 +33,7 @@ function Input.Open(title, data, isQBFormat, submitText) for i, v in pairs(returnData) do local index = i and tonumber(i) + v = tostring(v) == "true" and true or (tostring(v) == "false" and false or v) if not index then table.insert(convertedData, v) else