首先让我说我是同构框架的新手,所以要温柔。
我禁用"表格"什么时候创建。然后,一旦用户点击"按钮"它应该启用它。我遇到的问题是它只启用TextItems,而不是Section标题或ButtonItems。我错过了什么?
表格
isc.DynamicForm.create({
ID: "formSelectedUser",
width: 540,
numCols: 4,
disabled: true,
fields: [
{
defaultValue: "General Information", type: "section", sectionExpanded: true,
itemIds: ["tbFirstName", "tbLastName", "tbEmailAddress", "tbUserName", "tbParentClient"]
},
{ name: "tbFirstName", type: "text", title: "First Name" },
{ name: "tbLastName", type: "text", title: "Last Name" },
{ name: "tbEmailAddress", type: "text", title: "Email Address" },
{ name: "tbUserName", type: "text", title: "Username" },
{ name: "tbParentClient", type: "select", title: "Parent Client", defaultValue: "N/A" },
{
defaultValue: "Password Information", type: "section", sectionExpanded: true,
itemIds: ["tbCurrentPassword", "tbNewPasswordAttemptOne", "tbNewPasswordAttemptTwo", "btnUpdatePassword"]
},
{ name: "tbNewPasswordAttemptOne", type: "password", title: "New Password" },
{ name: "tbNewPasswordAttemptTwo", type: "password", title: "Confirm Password" },
{ name: "tbCurrentPassword", type: "password", title: "Current Password" },
{ type: "SpacerItem", colSpan: 1 },
{
name: "btnUpdatePassword", type: "ButtonItem", title: "Update Password", width: 146, endRow: false, startRow: false, click: function () {
console.log("user wants to change password..");
}
}
]
});
按钮
isc.Button.create({
name: "submit",
type: "button",
width: 140,
title: "Submit",
layoutAlign: "center",
click: function () {
formSelectedUser.setDisabled(false);
}
});
答案 0 :(得分:1)