getFormDialog

create a generic form object to create simple dialogs with 1 or 2 buttons.

Syntax

getFormDialog

Returns

returns (object) form ready to use with preset dialog

Parameters

message (string)
the main message with about ~300 chars space
button_1_text (string)
(optional) the displayed text on the first button, default is 'okay'
button_2_text (string )
(optional) the text displayed on the second button, default not added to form
width (integer)
(optional) the total width of the dialog, default 450

Usage

dialog(getFormDialog("a simple message"));

echo(dialog(getFormDialog("the main messge for the user, continue?", "yes", "no", 500)).returns == 1 ? "pressesd yes" : "pressesd no");