input

Creates and displays an input dialog with various field types.

Parameters:

  • label (string): Dialog title

  • data (table): Array of input fields

Input Field Structure:

{
    title = "Field Label",           -- Display label for the field
    type = "input",                  -- Field type (input, number, select, checkbox, etc.)
    description = "Field description", -- Help text for the field
    placeholder = "Enter text...",   -- Placeholder text
    options = {                      -- Options for select type
        {value = 'option1', label = 'Option 1'},
        {value = 'option2', label = 'Option 2'}
    },
    required = true,                 -- Whether field is required
    min = 1,                        -- Minimum value (for number type)
    max = 100                       -- Maximum value (for number type)
}

Returns:

  • table|nil: Array of input values or nil if cancelled

Example:

Input Field Types

text/input

Basic text input field.

number

Numeric input with min/max validation.

select

Dropdown selection from predefined options.

checkbox

Boolean checkbox input.

textarea

Multi-line text input.

Last updated