I have a checkbox and 2 hidden password fields in a form:
[code]{type: ‘checkbox’, name: ‘setPassword’, label: ‘Set Privacy Password’},
{type: ‘block’, width:400, list: [
{type: ‘password’, name: ‘password’,label: ‘Password’, hidden: ‘true’},
{type: ‘password’, name: ‘confirm’, label: ‘Confirm’, hidden: ‘true’},
]},[/code]
I want to show the password fields when you check the box.
form6.attachEvent("onChange", function(setPassword, value, isChecked) {
form6.showItem("password");
form6.showItem("confirm");
});
The problem I’m having is that the password fields show whenever any fields on the form are changed, rather than just the checkbox. Any idea what I’m doing wrong?