Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

auto numbering in an editable table cell

Avatar

Level 3

I created a dynamic table with add/delete row buttons and the second column with text fields.  The text field I want it to initially say <enter task 1> and <enter task 2> and when the user clicks on the add row button it would then say <enter task 3>.  I tried the patterns display but not sure how to get it to do auto numbering.  I also tried the formcalc script $ = Concat ("<Task", $.parent.index + 1, ">").  This seemed to work with the auto numbering but then I couldn't actually edit the boxes.  Any help on this would be greatly appreciated...thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Did you make the field as ReadOnly or Protected?

Also make sure where did you place your code? If it is in the Calculate event, the default is "Calculated - ReadOnly".

Placing the code in Initialize event might help.

Thanks

Srini

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Did you make the field as ReadOnly or Protected?

Also make sure where did you place your code? If it is in the Calculate event, the default is "Calculated - ReadOnly".

Placing the code in Initialize event might help.

Thanks

Srini

Avatar

Level 3

Cool thanks...that seemed to be the issue.  The script was in the ready:layout event...switched it to initialize and that worked.  Thanks for your help