I am building a static form (it must be static), and I want to have text appear/disapear based on an event trigger (mouseclick). I tried creating a floating text object inside of a static text object, but I'm not sure how I can make the string value for this change based on the event trigger. The only advice in the Adobe help was purely regarding FormCalc, which I can't use as this must be a static form. I tried using this code in the <script>, but it obviously didn't work as it was written from FormCalc code versus JaveScript;
TextField.rawvalue = variable.value;
What do you suggest in terms of being able to script this, so my static form will work? Thanks a billion if you can help!
PS: I'm using Adobe 9, LiveCycle ES 8.2
PPS: Also tried inserting the following into my trigger script;
xfa.resolveNode("form1.subform.TestField").rawValue= "Please Work";
It also did not work.
Exactly where is your script, you say "mouse click" but on which object is this set.
from your text I assume you are changing the value in the TextField box, not the caption, is that correct?
If the button and the textfield are on in the same subform then this code should work in the click event of the button
(assuming the name of the textfield is TextField1)
TextField1.rawValue = "some value";
If they are in different subforms then you have 2 options
Please note in both these options it is easier if the subforms have names ( I am assuming this to keep samples simple)
option 1 -
use the parent object to move up the tree till you are at the same level as that of the subform that contains the textfield
(Click Event of the button)
this.parent.subformname.TextField1.rawValue = "some value";
option 2 -
Use the resolve node to make your way down from the top level of the form
xfa.resolveNode ("form1.subformname.TextField1").rawValue = "some value";
Hope this helps
p.s. I am making assumptions as the image/file you attached did not appear for me.
I apologize-- it appears to work when the object is a text field, but not a text object. I was trying to change the text of a floating field inside of a text box. The only way that I can put the floating field in the text object is if it is set to hidden, and then it can't be made visible. I tried TextField.presence = 'visible'; after the changing of the .rawvalue, but it doesn't display. Is there any way for me to do this? Thanks!
Possibly by taking out some of the letters, the email scanners will not have an issue.
<s***** contentType="app*cation/x-j********" runAt="both">
Mask.presence = 'invisible';
SignButton.presence = 'invisible';
UnsignButton.presence = 'visible';
Sign.presence = 'visible';
Message.rawValue = "some value";
TextField.rawValue = "some value";
TextField.presence = 'visible';