Dialog
Declaring a dialog control
You declare dialogs directly under the <xh:body>
element (or under the <fr:body>
element for Form Runner forms) with:
When you have
appearance="full"
on the dialog, you define the title of the dialog with the embedded<xf:label>
element.Inside an
<xxf:dialog>
you can use all the XHTML and XForms elements you can normally use elsewhere on the page. You can have other XForms controls, or show anything you would like to with HTML.The attributes on the
<xxf:dialog>
are as follows:
Attribute | Mandatory | Values | Comment |
---|---|---|---|
| Mandatory | ID | The ID of the dialog. You reference this ID when opening the dialog with |
| Optional |
| See details below. |
| Optional |
| Can only be used |
| Optional |
| Can only be used |
| Optional |
| Can only be used |
| Optional |
| Whether the dialog is initially visible when the page loads. When |
| Optional | ID | Use only with |
| Optional | CSS classes | Adds a class on the HTML element that contains the dialog, which you can use to style its content. Also, if amongst the classes you specify |
You can set the appearance to either full
or minimal
:
The first screenshot below shows a dialog with
appearance="full"
while the second one shows a dialog withappearance="minimal"
.In general, you will use the minimal dialog when you want to show a limited set of information which is related to a certain element in the page. The minimal dialog is sometime also referred to as a "drop-down dialog".
Some of the other attributes on
<xxf:dialog>
can only be used for the full or the minimal dialog. You will find more details on this below.
The xxf:show
and xxf:hide
actions
xxf:show
and xxf:hide
actionsYou open a dialog by using the xxf:show
action:
If the dialog is already open, no action takes place.
xxf:show
supports the following attributes:
Attribute | Mandatory | Values | Comment |
---|---|---|---|
| Mandatory | ID | The ID of an existing dialog to open. |
| Optional | ID | Use only with |
| Optional |
| Whether to constrain the dialog to the viewport. |
You close a dialog by using the xxf:hide
action:
If the dialog is already closed, no action takes place.
xxf:hide
supports the following attributes:
Attribute | Mandatory | Values | Comment |
---|---|---|---|
| Mandatory | ID | The ID of an existing dialog to close. |
Events
See dialog control events for details.
Last updated