Client
dialog
fjsf.dialog(title, description, cancel, content, data)Opens an input dialog rendered in NUI and waits for user input.
Parameters
title
stringDialog title displayed at the top.description
string | nilOptional description text below the title.cancel
booleanIftrue, shows a Cancel button. Iffalse, only the Confirm button is shown.content
tableArray of input definitions. Each item defines one input field.
Supported input types
type = "input"
labelstringplaceholderstringdefaultstringpasswordbooleanrequiredbooleandisabledbooleanminnumber(minlength)maxnumber(maxlength)iconstring | niliconAnimstring | nil
type = "number"
labelstringdefaultnumberminnumbermaxnumberstepnumberrequiredbooleandisabledbooleaniconstring | niliconAnimstring | nil
type = "checkbox"
labelstringdefaultbooleanrequiredbooleandisabledboolean
type = "select"
labelstringplaceholderstring | niloptionstable{ label = string, value = any }defaultanyrequiredbooleandisabledbooleaniconstring | niliconAnimstring | nil
type = "multiselect"
labelstringplaceholderstring | niloptionstabledefaulttable | nilmaxnumber | nildisabledbooleaniconstring | niliconAnimstring | nil
type = "slider"
minnumbermaxnumberstepnumberdefaultnumberdisabledboolean
type = "color"
defaultstring(hex color, e.g.#ff0000)iconstring | niliconAnimstring | nil
type = "date"
defaultstring | booleanminstringmaxstringformatstringdisabledbooleaniconstring | niliconAnimstring | nil
type = "time"
defaultstringminstringmaxstringformatstringdisabledbooleaniconstring | niliconAnimstring | nil
type = "textarea"
defaultstringplaceholderstringminLengthnumbermaxLengthnumberautosizebooleanrequiredbooleandisabledbooleaniconstring | niliconAnimstring | nil
iconAnim
Defines the animation applied to the input icon. This parameter is purely visual and has no effect on logic or validation.
Type: string | nil
If omitted, the icon is static.
Allowed values
spinβ continuous clockwise rotationspinReverseβ continuous counter-clockwise rotationspinSlowβ slow rotationspinPulseβ rotation with scale pulsepulseβ smooth scale in/outbeatβ fast heartbeat scalebeatFadeβ beat with opacity fadefadeβ fade in/outblinkSoftβ soft blinkingbounceβ vertical bouncefloatβ gentle floating motionorbitβ small orbital rotationshakeβ horizontal shakewiggleβ rotational wiggletickβ quick ticking scaletiltBreathβ slow tilt + scalescanβ side-to-side scanpolarFloatβ irregular floating motion
Invalid values are ignored by the UI.
data
blur
booleanEnables background blur.sounds
booleanEnables sound effects.size
stringDialog size. Allowed values:smallmediumlarge
Returns
table | nil Array of input values in the same order as
content, ornilif the dialog was cancelled.
Example
closeDialog
Closes the dialog manually.
Parameters
result
any | nilResult value returned to the dialog handler.
Returns
This function does not return anything.
Example
Last updated