Form load - value for label type

Hello,
I have Form items like this

{type: “input”, name: “myname”, label: “My Name”},
{type: “label”, name: “mylabel”},
{type: “input”, name: “myaddr”, label: “My Address”}

XML

Roger
Roger
Smart Street

After Form.load all input type got value from database. How to get value for label type after call Form.load ?

Because used more complicated method like these before:

  • add one hidden type to Form {type: “hidden”, name: “mylabelhid”},
  • onXLE setItemLabel, value from hidden to label

Thanks

Hi

label is a static element, it do not have value, but you can try
dhtmlXForm.prototype.setFormData_label = function(name, value) {
this.setItemLabel(name, value);
};

Hi, Andrei…

So the summary, we can’t set the value automatically after call Form.load.

Thanks

Hi

  1. add the following code
    dhtmlXForm.prototype.setFormData_label = function(name, value) {
    this.setItemLabel(name, value);
    };

  2. now when you will call myForm.load() label also will updated