Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

hiding specific cells within of every row in a repeating row table on the exit button click

Avatar

Level 2

I have been struggling with how to approach hiding editing fields within specific cells of every row in the  table on the exit button click.

Dows the row have to be resolved? i any help is appreciated. 

//  Main.Links2.Tbl.Row1.Edit = this is the Hierachy

//  Main.Links2.Tbl.Row1.DEdit= this is the Hierachy

 

form1.Main.b.Exit::click - (JavaScript, client)

{

// Edit Buttons sf (b)

form1.Main.b.NoteOpen.presence = "visible";

form1.Main.b.Exit.presence = "invisible";

//  Protecting the field so it isn't included in tabbing.

form1.Main.Links2.Tbl.access = "protected";

form1.Main.Links2.Tbl.Row1.Edit.presence = "invisible";                 //////////////////////   I want this field in every row invisible

form1.Main.Links2.Tbl.Row1.DEdit.presence = "invisible";              /////////////////////   I want this field in every row invisible

}

//xfa.host.setFocus("form1.Main.Links.Tbl.Title.Cell1");

3 Replies

Avatar

Level 8

Assuming all your rows are named 'Row1':

for (var i=0;i<form1.Main.Links2.Tbl.Row1.all.length;i++){

     form1.Main.Links2.Tbl.Row1.all.item(i).Edit.presence="invisible";

     form1.Main.Links2.Tbl.Row1.all.item(i).DEdit.presence="invisible";

}

Kyle

Avatar

Level 2

thanks, but it still only hides the first row of invisible fields.

//  I copied and pasted this into the button.  

//  its location on the Hierarchy = form1.Main.b.Exit

//  Main.Links2.Tbl.Row1.Edit = this is the Hierachy

//  Main.Links2.Tbl.Row1.DEdit= this is the Hierachy

for (var i=0;i<form1.Main.Links2.Tbl.Row1.all.length;i++)

{

     form1.Main.Links2.Tbl.Row1.all.item(i).Edit.presence="invisible";

     form1.Main.Links2.Tbl.Row1.all.item(i).DEdit.presence="invisible";

}

Avatar

Level 8

Make sure your rows are named Row1 or Row1 is your repeatable row.

Kyle