|
onPopupOpen: function (args) {
if (args.type === "Editor") {
// Create required custom elements in initial time
if (!args.element.querySelector(".custom-field-row")) {
let row = createElement("div", { className: "custom-field-row" });
let formElement = args.element.querySelector(".e-schedule-form");
formElement.firstChild.insertBefore(
row,
args.element.querySelector(".e-title-location-row")
);
let container = createElement("div", {
className: "custom-field-container",
});
let inputEle = createElement("input", {
className: "e-field",
attrs: { name: "Employee" },
});
container.appendChild(inputEle);
row.appendChild(container);
var dropDownList = new DropDownList({
dataSource: [
{ text: "Nancy", value: "Nancy" },
{ text: "Steven", value: "Steven" },
{ text: "Robert", value: "Robert" },
{ text: "Smith", value: "Smith" },
],
fields: { text: "text", value: "value" },
value: "",
floatLabelType: "Always",
placeholder: "Employee",
});
dropDownList.appendTo(inputEle);
inputEle.setAttribute("name", "Employee");
}
}
}, |