when the checkbox is checked, change another field className

Hi,

I have 2 field in formdata, I want when the checkbox is checked, then the another field will change the className or add className Attributes.

org:
{type: “input”, label: “Last Name”,labelWidth:“80”,name: “lastName”,inputWidth:“500”,readonly:“true”, offsetTop: 10},
{type:“newcolumn”, offsetTop: 10},
{type: “checkbox”,name: “lastName_checked”,position:“label-right”,offsetTop:10},

change to new one
{type: “input”, label: “Last Name”,labelWidth:“80”,name: “lastName”,inputWidth:“500”,readonly:“true”, offsetTop: 10,className: “lbRed”},
{type:“newcolumn”, offsetTop: 10},
{type: “checkbox”,name: “lastName_checked”,position:“label-right”,offsetTop:10},

Could you give me the suggestion how to do it.

thank you very much.

Unfortunately the style changes of the dhtmlxForm items is not supported.

Hi,

thank you for your reply. If I want to rewrite the structure , how can do it .

  1. checked
  2. rewrite the structure {type: …}

thank you very much

the only solution is to unload your form and create the new one.

that’s meaning when received the data rewrite the form structure. but I don’t know how to upload the form.