#102626
olegr
Participant

Hi

Same problem here 🙁 Dropdown on “change” doesn’t get the values with next JS error:

smart.elements.js:27 Uncaught TypeError: Cannot read properties of null (reading ‘value’)
at t._getControlValue (smart.elements.js:27)

 

The code is:

const template = [{
controlType: “input”,
dataField: “tbtusername”,
label: null,
placeholder: config_app.t.tbtusername,
cssClass: “underlined”,
append: “<i class=’fas fa-user’></i>”
}, {
controlType: “password”,
dataField: “tbtpassword”,
label: null,
placeholder: config_app.t.tbtpassword,
cssClass: “underlined”,
append: “<i class=’fas fa-key’></i>”
}, {
dataField: “systemtheme”,
controlType: “dropdownlist”,
label: config_app.t.theme,
cssClass: “underlined”,
append: “<i class=’fas fa-palette’></i>”,
controlOptions: {
filterable: false,
selectionMode: “one”,
displayMember: “theme”,
valueMember: “theme”,
placeholder: config_app.t.select_option,
dataSource: [1,2,3,4,5]
}
}, {
controlType: “boolean”,
dataField: “tbtremember”,
label: config_app.t.tbtremember
}, {
controlType: “group”,
columns: 2,
controls: [{
controlType: “button”,
action: “submit”,
label: config_app.t.submit,
cssClass: “primary”,
align: “right”
}, {
controlType: “button”,
action: “reset”,
label: config_app.t.reset,
align: “left”
}]
}];
const form = new Smart.Form(“#form_login”, {
label: config_app.t.sysname + “<i class=’fas fa-chart-bar fa-lg’ style=’margin-left:15px;’></i>”,
labelAlign: “left”,
showSummary: false,
showColonAfterLabel: true,
controls: template
});
form.value = {
“tbtusername”: “”,
“tbtpassword”: “”,
“systemtheme”: 4,
“tbtremember”: false
};

  • This reply was modified 2 years, 9 months ago by olegr.