how can i apply same function to all repeatable subform

Comments

5 comments

  • Avatar
    Alexey Shmelkin (ABSC.de)

    Hi Chuckio,
    Could you please show the JS with [*] and where and how you call it?
    Regards,
    Alexey

    0
    Comment actions Permalink
  • Avatar
    chukio

    function feel()
    {
    debugger;
    var h={};
    h.fieldId='SubForm1:[*]/DropdownList1';
    eFormHelper.getFieldValue(h, function(resul){
    if(resul.isSuccess)
    {
    debugger;
    if(resul.data=="hide")
    {
    debugger;
    var o={};
    o.fieldId='SubForm1:[*]/TextBox4';
    eFormHelper.getFieldValue(o, function(rem)
    {
    if(rem.data!="")
    {
    debugger;
    o.propertyName=eFormHelper.constants.fieldProperty.Visible
    o.value=true;
    eFormHelper.updateFieldProperty(o, function(rest){});
    }
    else
    {
    debugger;
    o.propertyName=eFormHelper.constants.fieldProperty.Visible
    o.value=false;
    eFormHelper.updateFieldProperty(o, function(re){});
    }
    });
    }
    }
    else
    {
    console.log(resul.error);
    }
    });
    }

    0
    Comment actions Permalink
  • Avatar
    Alexey Shmelkin (ABSC.de)

    Hi Chukio,

    the first error is: [*] should be at the end:

    o.fieldId='SubForm1/TextBox4:[*]';

    Another error is not so obvious. Try this please.

    Regards,

    Alexey

    0
    Comment actions Permalink
  • Avatar
    chukio

    hi alexey

    i tried this [*] on end as well but that didn't work as expected . after adding [*] and [this] it didn't work.

    regards

    chukio 

    0
    Comment actions Permalink
  • Avatar
    chukio

    hi alexey,

    can you write down this same code on which this function is applicable to other repeatable sub-forms. 

    regards,

    chukio

    0
    Comment actions Permalink

Please sign in to leave a comment.