Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How used setFieldErrors ?

    Hi,

    I use a DynamicForm with TextItem, and I want put in error a item after a event. This is my code :
    Code:
    isc.DynamicForm.create({
        ID: "boundForm",
        fields :[
          { name : "champ", type : "text" },
          { name : "decimal", type : "float", validator:[{ type:"integerRange", min:"1", max:"20" }]}
         ]
    });
    
    isc.Button.create({
        left: 220,
        title: "Validate",
        click: "boundForm.validate()"
    });
    
    isc.Button.create({
        left: 220,
        top : 25,
        title: "Force valid",
        click: "boundForm.setFieldErrors ('flaot', {}, true); boundForm.setFieldErrors ('champ', {}, true);"
    });
    when I put a wrong value in "float" item and I push the "Validate" button, the title of the item is in bold and a icon is showed.
    When I use the "Force valid" button, the titles are in bold but the icons are not showed.

    what is the method to have icon and error style?
    Thanks.
    Last edited by lcourtet; 16 Nov 2011, 09:13.
Working...
X