BBjPrompt::modes

In BBj 25.03 and higher, this method sets assorted options on this BBjPrompt, corsresponding to the MODE= option of the PROMPT() function.

Syntax

Return Value Method
BBjPrompt modes(String modes)

Parameters

Variable Description
modes

One or more comma-separated options that modify the behavior of this BBjPrompt.

X=int,Y=int Displays the dialog at a specific screen location. Either or both may be specified. By default, the dialog is centered.
W=int,H=int Specifies the maximum width and height of the dialog window. Either or both may be specified. The dialog size is also limited by the size of the screen or browser.
SPLIT=int The optional SPLIT value specifies the maximum number of characters to show on a line before inserting a line break. This value overrides the STBL("!PROMPT_SPLIT") setting. The default is 100 characters.
attr=value DWC logoThe mode string can specify selected DWC component attributes (e.g. theme=primary,blurred=true). DWC button attributes can be applied to the OK and Cancel buttons using the format "button-0-theme=success, button-1-theme=danger".
button-#-label=value The [OK] and [Cancel] button labels can be customized in all three clients (GUI, BUI, DWC). For example, "button-0-label=Login,button-1-label=Exit" sets the [OK] button label to "Login" and the [Cancel] button label to "Exit".
input-type=type The input-type attribute can specify an alternative input type. If a specified type is unsupported in the current client, the default "text" is used.
 
Input-Type Description GUI BUI DWC
color Color Choser
date Date Input
datetime-local Date/Time Input
email Email Address Input
file Client File Chooser
month Month Input
number Number Input
password Password Input
range Range Input
search Text Input for Search
tel Telephone Number Input
text Text Input (Default)
time Time Input
url URL Input
week Week Input
property=value DWC logo The mode string can specify arbitrary DWC properties (e.g. "theme=info"). Themes can also be applied to individual buttons (e.g. "button-0-theme=success, button-1-theme=danger").
ICON=imagefile ICON=url The optional ICON value specifies a custom icon image, either an image file or a URL that will be reachable from the client (e.g. a DATA URL).
ICONWIDTH=int The optional ICONWIDTH value specifies an integer width to scale the specified ICON.
ICONHEIGHT=int The optional ICONHEIGHT value specifies an integer height to scale the specified ICON.
SCALE=num The optional SCALE value specifies the scaling factor to be applied to the dialog button and text fonts.

Return Value

Returns this BBjPrompt object, enabling methods to be chained.

password$ = bbjapi().prompt("Enter your password").modes("input-type=password").show()

See Also

BBjAPI

PROMPT() Function - Prompt For String Value

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.