How to change fields with similar names in an easier way?
Hello.
I have 10 fields with very similar names, the beginning of the name is identical, what changes is only the end, which goes from number 1 to 10.
I want to create two buttons:
1) By clicking on this button, the display of fields 1 to 5 is visible. And the display of fields 6 to 10 is hidden.
2) The opposite happens. Display of fields 1 to 5 is hidden. And the display of fields 6 to 10 is visible.
Is there an easy way to do this?
I was doing it this way:
this.getField("Field1").display = display.visible;
this.getField("Field2").display = display.visible;
And etc., one line for each field.
But this seems to be a very inefficient way.
Thank you.
