input
-- ARGUMENTS
-- data: table {
-- icon: string
-- header: string
-- submitText: string
-- inputs: table [{
-- name: string
-- icon: string
-- text: string
-- type: string ["number","text"]
-- placeholder: string (optional)
-- value: string OR number
-- min: string OR number
-- max: string OR number
-- },...]
-- }
-- RETURNS
-- nil
local form = {
icon = "fa-solid fa-info-circle",
header = "Character Registration",
submitText = "Submit",
inputs = {
{
name = "name",
icon = "",
text = "Name",
type = "text",
placeholder = "John"
},
{
name = "age",
icon = "",
text = "Age",
type = "number",
min = 21,
max = 60,
value = 21,
}
}
}
local res = ti.menus.input(form)
if res then
print( res.name,res.age )
end
Last updated