2 Replies Latest reply on Aug 22, 2011 12:25 PM by b.whitham

    Hide form field based on name that contains certain characters

    b.whitham Level 1

      I think this is an easy one.

       

      We're looking for help with a script that will hide all instances of text fields that contain a certain value. We have a function running that applies to the same text fields, however, each text field had to be tagged with a number at the end. Also running with this is a custom save button that flattens the page and hides certain elements before saving out. The hide function works pretty straightforward with "this.getField… = display.hidden;". The issue is that we don't want to repeat this for every single instance of the text fields that share the same name.

       

      We need it look for every text box that has a similar title so for instance if we had multiple fields like this…  "my-text-field-01", "my-text-field-02" and "my-text-field-03" we want the script to look for the name "my-text-field" and hide all instances of that.

       

      Hope this makes sense, sorry, our programming skills are still amateur. Thanks in advance for any help.