Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Populating textfield based on entry of another textfield

Avatar

Level 3

Hi Guys,

I have a problem.

I have a textfield and entry information in it which should be populated in antother textfield. It sounds easy, but the trick is. For every new entry a new textfield should appear with this information. My problem is, that it creates a textfield, but for every single letter which I type in and not for a string when I push enter.

see attached example.

I hope you can help me!!!

Thanks,

Diana

This is the code: (I cant attach the example for some reason)

Table_SF._Repeat_SF.addInstance(1);
xfa.resolveNode("Table_SF.Repeat_SF[" + (Table_SF._Repeat_SF.count - 1) + "]").TextField1.rawValue = xfa.event.newText;

1 Accepted Solution

Avatar

Correct answer by
Level 10

Instead of placing the code in the change event, copy it to Exit event.

Table_SF._Repeat_SF.addInstance(1);

xfa.resolveNode("Table_SF.Repeat_SF[" + (Table_SF._Repeat_SF.count - 1) + "]").TextField1.rawValue = this.rawValue;

Thanks

Srini

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Instead of placing the code in the change event, copy it to Exit event.

Table_SF._Repeat_SF.addInstance(1);

xfa.resolveNode("Table_SF.Repeat_SF[" + (Table_SF._Repeat_SF.count - 1) + "]").TextField1.rawValue = this.rawValue;

Thanks

Srini

Avatar

Level 3

Hi Srini,

Thank you very much, it works!!

I just have another question.

the information which i enter in the textfield should be also populated in a listbox. i have a delete button with this code:

var

selIndex = SOLlist.selectedIndex;

if

(selIndex != -1){

SOLlist.deleteItem(selIndex);

Table_SF._Repeat_SF.removeInstance(selIndex);

}

else {

app.alert("You must select an entry from the List!");

}

it works, but when i export the data with xml, the informatation which i have deleted from  the listbox still remains. this is a problem.

Do you know how to solve this problem?

Thank you in advance!!

Diana