JixelPatterns
  • JixelPatterns Documentation
  • Troubleshooting
    • Common Issues
    • Setting Up Locations
    • FAQ
  • Dependency
    • Jim_Bridge
      • Animal Ped Support
      • Script Helpers
      • Loader Functions
      • Callbacks
      • Cameras
      • Context Menus
      • Crafting
      • DrawText
      • Dui Functions
      • Input Creator
      • Inventories
      • Job Functions
      • Make Functions
      • Meta Handlers
      • Notifications
      • Phones
      • Player Functions
      • Poly Zones
      • Progress Bars
      • Scale Entity
      • Shops
      • Skillcheck
      • Society Banking
      • Stash Control
      • Targets
      • Vehicles
      • Wrapper Functions
      • Scaleforms
  • Paid Assets
    • Jim-Mechanic
      • Common Issues
      • Installation
      • Locations
        • Creating a Location
      • Nitrous
      • Harness + Seatbelt
      • Emergency Repair Bench
      • Odometer
      • Speedometer
      • Performance Mods
      • Preview System
      • Repair System
      • Car Lifts
      • Plate Change
      • Push Vehicle
      • Stancer Kit
      • Vehicle Seat Picker
    • Jim-Bakery
      • Installation
    • Jim-BeanMachine
      • Installation
    • Jim-BurgerShot
      • Installation
    • Jim-CatCafe
      • Installation
    • Jim-Henhouse
      • Installation
    • Jim-PizzaThis
      • Installation
    • Jim-Popsdiner
      • Installation
  • Free Assets
    • Jim-Mining
      • Installation
      • How To Use
        • Mining
        • Stone Washing
        • Gold Panning
    • Jim-Recycle
      • Installation
      • How To Use
        • Recycling
        • Dumpster Diving
        • Scrapping
    • Jim-Payments
      • Installation
      • How To Use
    • Jim-Shops
      • Installation
      • How To Use
    • Jim-Boarding
      • Installation
      • How To Use
    • Jim-Trains
      • Installation
      • How To Use
    • Jim-Consumbles
      • Installation
      • How To Use
    • Jim-DJBooth
      • Installation
      • How To Use
    • Jim-JobGarage
      • Installation
      • How To Use
    • Jim-Chairs
      • Installation
    • Jim-Notepad
      • Installation
      • How To Use
Powered by GitBook
On this page
  • input.lua
  • createInput(title, opts)
  1. Dependency
  2. Jim_Bridge

Input Creator

input.lua

This function displays a customizable input dialog for user text or number entry. It supports both simple and complex input structures.

createInput(title, opts)

Opens a styled input dialog with configurable fields, labels, input types, and validation.

Supports multiple field types including text, number, password, checkbox, color, slider, and more.

Decides which input script to use based on per script config settings

Parameters:

  • title (string): Title displayed at the top of the input box.

  • opts (table): A table of fields with attributes like label, name, type, value, and more.

Example:

local userInput = createInput("Enter Details", {
    { type = "text", text = "Name", name = "playerName", isRequired = true },
    { type = "number", text = "Age", name = "playerAge", min = 18, max = 99 },
    { type = "radio", label = "Gender", name = "playerGender", options = {
        { text = "Male", value = "male" },
        { text = "Female", value = "female" },
        { text = "Other", value = "other" },
    }},
})
if userInput then
    print(json.encode(userInput))
end

PreviousDui FunctionsNextInventories

Last updated 4 days ago