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.

Automatic row entry on fillable form.

Avatar

Level 1

What are the instructions:  I am creating a form.  I have a text field and two drop downs next to it.  I would like it if the person who is completing the form could just enter and a new line will add automatically.  Is this possible?

3 Replies

Avatar

Level 10

Hi, Pressing the enter key will fire the exit event of the field with the commitKey property set to 2, so something

if (xfa.event.commitKey === 2)  {

    // code to add row

}

Avatar

Level 1

I am a little confused.  Where is the commitKey?  I have three text fields across.  Not sure if this will make a difference.

Avatar

Level 10

Hi,

If I understand correctly you have fields on a row and you want to detect the enter key being pressed?  Pressing the enter key will fire the exit event of the field, in the exit event you can test for the enter key (as opposed to the escape key, tab key or using the mouse).

There is more information about the commitKey property in the reference Adobe LiveCycle ES3 * commitKey

Regards

Bruce