How to dynamically populate different fields on a dialog
Hi there,
Am trying to show different form fields on a dialog, based on an event.
Would appreciate any help.
Hi there,
Am trying to show different form fields on a dialog, based on an event.
Would appreciate any help.
For dynamically populating form fields in a dialog box, please check below eg:
If you want to define a select box by configuring a Select component in dialog.any as follows:
...
/Type "AtomLine"
/Sub
{
/mySelectAtom
{
/Type "Select"
/Option
{
/option0
{
/value "red"
/text "Scarlet"
}
/option1
{
/value "green"
/text "Lime"
}
/option2
{
/value "blue"
/text "Azure"
}
}
}
}
...
For this, you can hard code all for the select options in dialog.any. However, you can define and manage these options as an external resource and to populate the dialog dynamically.
Use an OwnerDraw type in dialog.any instead of Select to specify a script that draws a CFC component programmatically. In the script, you can retrieve the values from an external resource and populate the dialog. So, to change the Select example to use an OwnerDraw do the following.
The example uses CFC.Controls.Select. But you can use the same OwnerDraw approach with other CFC objects. In fact, you can use the OwnerDraw to draw any section of the dialog which cannot be defined using .any notation.
References:
https://helpx.adobe.com/experience-manager/using/creating-touchui-dynamic.html
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.