Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Bug with the Full event?

Avatar

Former Community Member
I think I may have found a bug with the full event. The XFA

specification indicates that the event is fired when the last allowable

character is typed into a field. I even found the following on page 217

of the XFA spec:



When the user types the last allowed character into field A, the order

of events is:

1. change event for field A

2. full event for field A



However, the full event is not triggered when the last allowed character

is typed. It does not get triggered until you attempt to add an extra

character. For example, if I set the maximum size of a field to '3',

the full event is not triggered until I try to (unsuccessfully) type a

fourth character. This appears to contradict the XFA specification.



Can anyone else confirm whether this is a bug or not and whether or not

it has been reported?



Thanks!

Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com
6 Replies

Avatar

Former Community Member
I don't believe this is a bug.



The XFA spec states that the Full event "occurs when the user has entered the maximum amount of content allowed into the field."



I think you're being misled by the words used to describe the event since it could be interpreted in two different ways because of the use of the word
when: First, the way you interpreted it and second, the way that it's behaving, which is to occur when the user attempts to enter
additional content into a field whose content is already at its max.



I hope this clarifies things.



Stefan

Adobe Systems

Avatar

Former Community Member
FormBuilder@adobeforums.com wrote:<br />> I don't believe this is a bug.<br />> <br />> The XFA spec states that the Full event "occurs when the user has entered the maximum amount of content allowed into the field."<br />> <br />> I think you're being misled by the words used to describe the event since it could be interpreted in two different ways because of the use of the word when: First, the way you interpreted it and second, the way that it's behaving, which is to occur when the user attempts to enter additional content into a field whose content is already at its max.<br />> <br />> I hope this clarifies things.<br />> <br />> Stefan<br />> Adobe Systems<br /><br />Stefan,<br /> I don't agree with your assessment. Read the information below (from <br />pages 270-271) and tell me if you still think the same thing.<br /><br /> Rule 2: Full and change events<br /><br /> For full and change events triggered by the same change of state <br />the change event occurs before the full event. For example, given the <br />following template fragment:<br /> <field name="A"><br /> <event name="full" ref="$" ... /><br /> <event name="change" ref="$" ... /><br /> </field><br /><br /> When the user types the last allowed character into field A, the <br />order of events is:<br /> 1. change event for field A<br /> 2. full event for field A<br /><br /><br /><br />If this were to happen when the field was already full as you indicated, <br />then there would be no change event triggered because it would not allow <br />you to type in any more data.<br /><br /> Justin

Avatar

Former Community Member
I will, however, suggest to our Documentation Team that they clarify the meaning of the Full event in the next version of the documents which detail the XFA spec.



Stefan

Adobe Systems

Avatar

Former Community Member
Justin,



I'm beginning to think you're on to something. You've made me realize that there's a discrepancy in the reference documents that describe the XFA language:







  1. The
    XML Form Object Model Reference, page 330, states that the full event "occurs when the user
    has entered the maximum amount of content allowed into the field."





  2. The
    XML Forms Architecture (XFA) Specification, version 2.2, page 304, states that "
    when the user types the
    last allowed character into field A, the order of events is: change event for field A, full event for field A".







As I mentioned before (in my previous post), #1 sounds a lot like the current behaviour where the Full event only occurs
after the user has entered enough content to fill the field -- meaning that it doesn't occur until the user attempts to enter the next character
after filling the field.



Now #2, to which you alerted me, is
contradictory to what's stated in #1 because #2 clearly states that the Full event occurs
as the user enters the
last allowed character into the field.



So this is a question of figuring-out where the bug is: Is it a documentation bug or an implementation bug?



I'll do some digging and come back with an answer next week when the people I need to consult are back in the office.



Thanks for alerting me to the definition for the Full event in the online PDF version of the XFA spec! I didn't realize how it differed from the internal spec I normally use as a reference.



Stefan

Adobe Systems

Avatar

Former Community Member
I also encountered this problem, recently when trying to generate a 3 field box for a social security number section.



The problem is the same as justin mentions it, and moreover, if your field is three characters long, and the user tries to type in the 4th characther, the fourth character is completley lost.



So if you try to create a full event that says when this field is full move on over to the next one, it errors out, then passes you to the next field, but it loses the character just typed.



Jeremy.

Also from Cardinal.

Avatar

Former Community Member
Justin and Jeremy,



I've just received confirmation that it's a documentation bug, not an implementation bug. The XFA Full event is meant to function in the same way as the AcroForm Full event which is supposed to fire when you try to type
more characters
than what's allowed. I will log a bug against this topic the XML Form Object Model Reference document.



This means that this is the expected sequence of events on a text field with a maximum number of 3 characters allowed:



change (a)

change (ab)

change (abc)

change (abc), full // user tried to add "d"


In response to Jeremy's complaint about losing the "d" once the field was full, you unfortunately can't depend on the Full event and you can't set a maximum number of characters on the text field to know when the field is full if you want to know what the "extra" character the user entered was. Rather, you would have to write a little script which imposes the maximum number of characters as follows (Change event in JavaScript):



var sNewText = xfa.event.newText;



if (sNewText.length > 3)

{

var sNewChar = sNewText.substr(sNewText.length - 1, 1); // extract new character from the new text value



// impose max length of 3 characters

xfa.event.change = ""; // revoke the change in value, effectively throwing away the character that was just entered

}


Stefan

Adobe Systems