disable input is not working

Hi there:

i’m trying to disable a few inputs. But looks it’s not working. i have tested hide, show, enabledItem and it’s work but if i try to disabled: Does not work.

[code]
alert(‘hide’);
contactForm.hideItem(“ID”);

  alert('show');
  contactForm.showItem("ID");

  alert('enableItem');
  contactForm.enableItem("ID");

  alert('disableItem');
  contactForm.disableItem("ID");[/code]

Can somebody help me?

anybody?

Hello,

Please use attachd dhtmlxform.js

for radiobutton:
dhxForm.showItem(id, value);
dhxForm.hideItem(id, value);
dhtmlxform.js.zip (13.7 KB)

Andrei:

Thank for you re help but this code still is NOT working. i tried several time without any succefull. I send you the full code the simplest as i can. The option hide-show works the option
enable disable send error.

[code]

<script type="text/javascript" src="codebase/dhtmlxForm.js">&nbsp;</script>
[/code]

i will apreciate any help.

Hello,

Show/hide working fine with your demo on our side (code a bit changed, see below). Enable/disable not public methods (form automaticaly enabling/disabling items, this depend on parent).

Also, you’re using loadStruct() for loading data into form, and then immediately calling show/hide. loadStruct() used async request, so when you calling hideItem not a fact data came from server and exist.

So, you need to use onXLE event or onLoad handler:

form.attachEvent("onXLE", function(){
    form.hideItem("ID");
});
form.loadStruct("xml/file.xml?param=value");

or

form.loadStruct("xml/file.xml?param=value", function(){ form.hideItem("ID"); });