How enable row inside subform by javascript ?

Comments

3 comments

  • Avatar
    Sampat Patil

    HI Abdulaziz Alanazi,

    You can make us of following documentation to update control property

    Here is the example below:

    /* Function which can be called to enable disable control */
    function EnableControl(name, value) {
    eFormHelper.updateFieldProperty({fieldId: name, propertyName: eFormHelper.constants.fieldProperty.Enabled, value: value });
    }

    /* How to use it */
    EnableControl('TextBox', false); // for disabling
    EnableControl('TextBox', true); // for enabling
    EnableControl('SubForm1/TextBox: [1]', true); // for enabling specific row
    EnableControl('SubForm1/TextBox: [*]', false); // for enabling all

    You can make a function out of helper methods and call multiple times when ever needed.

     

    0
    Comment actions Permalink
  • Avatar
    Abdulaziz Alanazi

    thanks Sampat ,

    EnableControl('SubForm1/TextBox: [1]', true); // for enabling specific row

    it's enabling specific fields not row : (
    0
    Comment actions Permalink
  • Avatar
    Sampat Patil
    EnableControl('SubForm1/TextBox: [1]', true); // for enabling specific field in a row

    Considering two controls in subform row named: Name, Email here is an example below

    EnableControl('SubForm1/Name: [1]', true); 
    EnableControl('SubForm1/Email: [1]', true);

     

    0
    Comment actions Permalink

Please sign in to leave a comment.