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.
SOLVED

LiveCycle ES4. How can I set focus to an expanding row in a table?

Avatar

Level 2

Say I click a + button to add a row to a table. How can I xfa.host.setFocus to a cell in the NEW row? The only thing I can manage to do currently is set the focus to Row 1 Cell 1. But how can I write a script for a table row that does not actually exists until the user clicks the "+" button? Currently when I add a multiple rows, the focus will be placed into row 1 every single time. I want each NEW row cell 1 to get the focus.

Header 1Header 2Header 3
Imagine a plus + button to the left of this. User clicks it. The row below me appears, with a blinking cursors ready for input. (I know its there, but pretend it does not appear until the user clicks the plus button above)
| (blinking cursor)

Windows 10, LiveCycle ES4, Version 11.0.0.20130303.1.892433

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi there,

when using a button to add a row you are probably using the following method:

by using this method, it will return the instance added within the table. So you can hold the new instance in a variable, like the following:

with the new variable, you have the right path to be able to set focus on the field you want with the following:

I hope this will help you.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi there,

when using a button to add a row you are probably using the following method:

by using this method, it will return the instance added within the table. So you can hold the new instance in a variable, like the following:

with the new variable, you have the right path to be able to set focus on the field you want with the following:

I hope this will help you.