Input

Functions

input(name, options)

Creates and displays an input form with various field types.

Parameters:

  • name (string, optional): Title of the input form. Defaults to 'Input Menu' if not provided

  • options (table): Array of input field configurations, each containing:

    • type (string): Input field type ('text', 'number', 'select', 'checkbox', 'textarea')

    • title (string): Label text for the input field

    • placeholder (string/number, optional): Placeholder text or default value

    • required (boolean, optional): Whether the field is required

    • description (string, optional): Additional description text

    • min (number, optional): Minimum value for number inputs

    • max (number, optional): Maximum value for number inputs

    • options (table, optional): Options array for select inputs with label and value properties

Returns:

  • result (table): Form data with field values, or nil if cancelled

Exports:

  • Standard Export: exports['ps-lib']:input(name, options)

  • PS-UI Export (Legacy Support): exports['ps-ui']:input(name, options)

Input Field Types

Text Input

Number Input

Select Dropdown

Checkbox

Textarea

Usage Examples

Basic User Registration Form

Last updated