Please give me a code example on how to dynamically add any form elements to Dialog.
var myDialog = new Dialog({
title: "Edit form",
style: "width: 300px; height: 200px"
});
myDialog.show();
It seems I figured it out a little, but I need to somehow wrap the elements in a div since they go in the Dialog box in one line, I don’t know how to do this
var form = new Form();
var myDialog = new Dialog({
content: form,
title: "Dialog Box",
style: "width: 300px; height: 200px"
});
new Select({
name: "select2",
options: [
{ label: "Item1", value: "1" },
{ label: "Item2", value: "2" },
{ label: "Item3", value: "3" }
]
}).placeAt(form.containerNode);