context input

Fontawesome is used to add icons to the list items, you can find the code here.

Context Input


How to use:

Client-side using exports

Example:

  • heading: string

  • rows: string[] or table (array)

    • type: 'text' or 'password' or 'number' or 'textarea' or 'checkbox' or 'select' or 'slider' or 'radio' or 'date'

  • options?: table(object)

    • allowCancel: boolean

      • If false the user will not be able to cancel and close the input dialog until submitted.

      • If not defined, the user is able to cancel and close the input dialog.


Field Type Properties

  • text / password

    • name: string

    • label: string

    • description?: string

    • placeholder?: string

    • icon?: string

    • required? boolean

    • disabled?: boolean

    • default?: string

    • min?: number

    • max?: number

  • number

    • name: string

    • label: string

    • description?: string

    • placeholder?: string

    • icon?: string

    • required? boolean

    • disabled?: boolean

    • default?: number

    • min?: number

    • max?: number

    • step?: number

  • textarea

    • name: string

    • label: string

    • description?: string

    • placeholder?: string

    • icon?: string

    • required? boolean

    • disabled?: boolean

    • default?: number

  • checkbox / radio

    • name: string

    • label: string

    • options: table(array)

      • value: string

      • label?: string

      • disabled?: boolean

    • required?: boolean

    • default?: string

  • select

    • label: string

    • options: table(array)

      • value: string

      • label?: string

    • description?: string

    • placeholder?: string

    • icon?: string

    • required? boolean

    • disabled?: boolean

    • default?: string

  • slider

    • label: string

    • placeholder?: string

    • icon?: string

    • required? boolean

    • disabled?: boolean

    • default?: number

    • min?: number

    • max?: number

    • step?: number

  • date

    • label: string

    • description?: string

    • icon?: string

    • required? boolean

    • disabled?: boolean

    • default?: string or true

      • True defaults to current date

    • format?: string

      • Date format to display in the field

    • returnString?: boolean

      • Returns the date as a string, default format is DD/MM/YYYY, but if format is defined it will use that.

    • clearable?: boolean

    • min?: string

      • "01/01/2000"

    • max?: string

      • "12/12/2023"

The callback data is promise based meaning that the thread will not continue executing until the user either sends the data or exits the popup


Usage Example


qb-input replacement

To replace qb-input with this script, you need to enable the functionality in the config.lua and remove a comment in the fxmanifest.lua

Last updated