Expand my Community achievements bar.

Set rawValue of field in "full" event

Avatar

Level 3

As I learned in a recent post ( http://forums.adobe.com/thread/827231? ), I have to use xfa.event.newText to get the value of a field in that field's "full" event (not the field's rawValue). But in the "full" event, I want to also then change the value of the text field that triggered the "full" event. But that isn't working, because the rawValue property isn't getable or setable in the "full" event.

So if a field fires a "full" event, how can I then change the text of that field in the "full" event? Like I said, rawValue isn't accessible in that event.

this.xfa.form.Ultra_Form.Page5.TF1.TextField1.rawValue = "New Text"; //this won't work in the "full" event

- Nathan

1 Reply

Avatar

Level 7

I can get the value on the full event by using the following script:

TextField2.rawValue = xfa.event.newText;  // the text entered shows up in the TextField2 when full event fires

To change the value of the field you could have another event fire when the full event fires, like:

this.execEvent("exit");  //and place a this.rawValue = "somevalue"; on the "exit" event

Of course, this will fire on every exit, so depending on your objective this might not work for you. (form:ready might be a possible alternative)

Good luck!

Stephen

Message was edited by: kingphysh