You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to change the subtitle for storemenu2 to contain the text used in qb-input.
I use storemenu2.subtitle = storename and it works the first time I open the menu. It shows correctly.
Then when I try to open the menu for a second time, storemenu2.subtitle still shows the correct title string, but the menu itself shows the default subtitle.
Any way around this?
`edit_store_menu:On('select', function(_) -- Open Menu To Edit Existing Store
local dialog = exports['qb-input']:ShowInput({
header = "Store Editing",
submitText = "Confirm",
inputs = {
{
text = "Store Name You Want To Edit", -- text you want to be displayed as a place holder
name = "namestore", -- name of the input should be unique otherwise it might override
type = "text", -- type of the input
isRequired = true, -- Optional [accepted values: true | false] but will submit the form if no value is inputted
-- default = "CID-1234", -- Default text option, this is optional
}
},
})
if dialog ~= nil then
local storename = nil
for k,v in pairs(dialog) do
if k == "namestore" then
storename = v
end
end
QBCore.Functions.TriggerCallback('core_stores:server:checkStoreName', function(cb)
if cb then
MenuV:OpenMenu(storemenu2)
storemenu2.subtitle = storename
oldStoreName = storename
end
end, storename)
end
end)
`
The text was updated successfully, but these errors were encountered:
I want to change the subtitle for storemenu2 to contain the text used in qb-input.
I use storemenu2.subtitle = storename and it works the first time I open the menu. It shows correctly.
Then when I try to open the menu for a second time, storemenu2.subtitle still shows the correct title string, but the menu itself shows the default subtitle.
Any way around this?
local storemenu2 = MenuV:CreateMenu(false, Lang:t('menu.edit_title'), menuLocation, 220, 20, 60, 'size-125', 'none', 'menuv', 'edit2')
`edit_store_menu:On('select', function(_) -- Open Menu To Edit Existing Store
local dialog = exports['qb-input']:ShowInput({
header = "Store Editing",
submitText = "Confirm",
inputs = {
{
text = "Store Name You Want To Edit", -- text you want to be displayed as a place holder
name = "namestore", -- name of the input should be unique otherwise it might override
type = "text", -- type of the input
isRequired = true, -- Optional [accepted values: true | false] but will submit the form if no value is inputted
-- default = "CID-1234", -- Default text option, this is optional
}
},
})
end)
`
The text was updated successfully, but these errors were encountered: