Greetings All,
I am using formCalc.
My form has a dropdown box that Allows Custom Text Entry. On the change event is a script like the following:
SubformRecap.TableLiabilityRecap.Row[13].Cell[1] = xfa.event.newText
The custom entered text works ONLY when the user:
The script fails to capture the newText if ANY of the following occur
When it fails the following text/integer shows up in the referenced field: 1
I have limited users so I suppose I could train them, however, I'd like to avoid that if at all possible. It is a large form and TAB the norm for entering and exiting fields. People are using this on their laptops in the field--so having quirks like this a major annoyance.
Is change the right event? Is there some way to script the ENTER key (a virtual ENTER)?
Thanks in advance!
Stephen
Solved! Go to Solution.
Views
Replies
Total Likes
Well, this problem sounds interesting... I've tried to rebuild it but to no avail, for me it works in any case so far.
Views
Replies
Total Likes
Hmm,
I could not reproduce this behavior.
In my form the textfield always shows the changed value of the drop down immediately, no matter if I select an item before or highlight parts the values.
Do you use scriptings to populate the drop down?
Views
Replies
Total Likes
Thanks Radzmar,
Yes, when I build a simple form to test this, it works perfectly.
The problem is bigger than I originally described! Its not just the Custom Text entry. It is also the dropdown box item selection, as well.
The target field populates as I type a Custom Text AND/OR the target field populates with the selected dropdown box item text, if the user selects a dropdown box item. So far, so good.
However, if I TAB out of the dropdown box after I type a Custom Entry
OR
if I TAB out of the dropdown box after I select one of the dropdown items, the target field clears the text and shows the text/integer: 1
If I hit ENTER after I type a Custom Entry
OR
If I hit ENTER after I select one of the dropdown items, the target field keeps the text that has populated it. In other words, works as expected.
There are NO scripts on the target field.
There are 2 other scripts on the dropdown box:
I don't get it. TAB and ENTER have different actions with a newText script on my form.
Thanks,
Stephen
Views
Replies
Total Likes
OK, I think I've figured out how to fix this.
SubformRecap.TableLiabilityRecap.Row[13].Cell[1] = xfa.event.newText //this has a problem with TAB
SubformRecap.TableLiabilityRecap.RowNamed.CellNamed = xfa.event.newText // seems to work with TAB (still testing other places I use the newText script for targets in this table)
I don't understand why? The first script finds the target either way and functions using ENTER (TAB puts "1" in the target)
I use loops to do some things with some of the other table cells, so that is why they are all named Cell[*]. I can change that for this script and keep the names of the cells in the rows that are the target of my looping scripts the same--just change the integers in the looping scripts. Its a big form and will take some time to make all the changes.
I would still like to understand why?
Best,
Stephen
Views
Replies
Total Likes
Hi All,
I found that if my SOM contains any objects with multiple instances, I get the newText error described above (TAB has error, ENTER works fine):
I have tried formCalc and javaScript, both with and without resolveNode()
The script ALWAYS finds the target field, however with different results--so you would think that it is not a SOM issue.
Change the target to one where the SOM has no objects with multiple instances, and TAB works! So the SOM does make a difference, Why?
I use the newText many times successfully in the form on SOMs without [ ]
Several places, I don't have a choice--the SOMs will have [ ] so TAB will fail.and the user must use ENTER. This is not good!
Any help is appreciated.
Stephen
Views
Replies
Total Likes
Well, this problem sounds interesting... I've tried to rebuild it but to no avail, for me it works in any case so far.
Views
Replies
Total Likes
UPDATE:
If anyone is working on the answer, please STOP. I am looking at all the scrpts, and so far I have found something that MAY BE causing the problem. I will start a new thread if I can't figure it out.
Thanks,
Stephen
Views
Replies
Total Likes
Views
Likes
Replies