Announcement

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

    How to activate and deactivate fields in a dynamic form?

    I am using a DynamicForm to allow the user to enter data into the application. How can I activate and then deactivate the fields in this form?

    myForm = isc.DynamicForm.create({
    ID: "myForm",
    left: 50, top:250,
    witdth: 300,
    fields: [
    {name:"title", title:"Title"},
    {name:"first", title:"First Name"},
    {name:"last", title:"Last Name"}
    ]
    });

    Currently, the fields are active. How can I deactivate the fields and have them activate again?

    #2
    Hi erik2000,

    see DynamicForm.getField and FormItem.enable. There is also FormItem.readOnlyWhen if your rules are simple, see this sample.

    Best regards
    Blama

    Comment

    Working...
    X