Optional
defaultValueIndex: numberPlayer to show this dialog to.
Creates and shows this modal popup form. Returns asynchronously when the player confirms or cancels the dialog.
This function can't be called in read-only mode.
Optional
defaultValue: numberOptional
defaultValue: string | RawMessage
Used to create a fully customizable pop-up form for a player.
Example: modalFormSimple.ts
Example: effectGenerator.js
Example: Effect Generator Form
Example Code (v2)
Example Code (v1)
Modal Form v2.0.0-beta features
@minecraft/server-ui v2.0.0-beta module currently adds headers, dividers, labels and more. The following images demostrates those features (subject to change).