Real Simple, if "United States" is chosen on my dropdown, I would like a certain textbox to dissappear. I have tried all of these syntax, but nothing will work, please help:
if(xfa.event.newTexT == 'United States'){
txtTempID.presence = "hidden";
}
or
if(this == 'United States'){
txtTempID.presence = "hidden";
}
or
if(this.rawVaule == 'United States'){
txtTempID.presence = "hidden";
}
or
if(this.rawVaule == '134'){
txtTempID.presence = "hidden";
}
None of these worked, btw United States has a value of "134" on my dropdown list. Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Change the line of code to say
txtbox.rawValue = txtbox.rawValue + "PLEASE READ!!!"}
Paul
Views
Replies
Total Likes
if(xfa.event.newText == "United States"){
txtTempID.presence = "hidden";
}
OR
if(this.rawValue == '134'){
txtTempID.presence = "hidden";
}
Both of the ways it will work. But for this form should save as dynamic pdf Form type.
RAGHU.
Hey I have a followup question:
if(this.rawValue =='1'){
subformUS1.presence = "hidden";
txtbox.rawValue = "PLEASE READ!!!"}
This will populate the txtbox with the words "PLEASE READ!!!". However, anything else that I have currently written in that text box is erased. Is it possible to add the words "PLEASE READ!!!" to my text box, instead of replacing it? thanks!!
Views
Replies
Total Likes
Change the line of code to say
txtbox.rawValue = txtbox.rawValue + "PLEASE READ!!!"}
Paul
Views
Replies
Total Likes
Question Answered. THANKS!!
Views
Replies
Total Likes
If that check box clicks only one time that would be fine, if not it will keep on add those values again and again.
Lets assume
Hidden field as - TextField3
your text field which need changes in text as - txtbox
here is the code.
First assign TextField3 value as txtbox initial value.
On form ready event assign the hidden field value to ur text field.
txtbox.rawValue = TextField3.rawValue;
on change event ur code like this
var oldV = TextField3.rawValue;
if(this.rawValue =='1'){
subformUS1.presence = "hidden";
txtbox.rawValue = oldV + "PLEASE READ!!!";
}else{
txtbox.rawValue = oldV;
}
RAGHU.
I know this question has been answered, but I have a quick followup question. When adding additional text to my textbox, I would also like it to go to the next line. I used "/n", but I'm not sure if that's correct. How would I get it to skip a line, then add the new text? Thanks
Views
Replies
Total Likes
use "\n" to start in new line. Any text after this newline character ("\n") will be displayed in the next line.
Views
Replies
Total Likes
As always, you've been a big help. Thanks Raghu
Views
Replies
Total Likes
Hey, I had another followup question. I followed Raghu's instructions from before, but I encountered a problem:
var oldV = txtVar.rawValue;
if(xfa.event.newText == "US"){
txtReminder.rawValue = oldV + "\n ALERT #1."}
else{txtReminder.rawValue = oldV;}
var oldV = txtVar.rawValue;
if(xfa.event.newText == "UK"){
txtReminder.rawValue = oldV + "\n ALERT #2."}
else{txtReminder.rawValue = oldV;}
Everytime UK is selected in my dropdown, "ALERT #2" appears, and then disappears if another option is selected (this is exactly what I want). However, nothing happens when US is selected. When I delete the second script block (the UK one), the US selection now works. Please advise on how I can get both to work.
txtReminder is the text box that is being modified
txtVar is the hidden text box.
Views
Replies
Total Likes
Problem with the code u have written, its having repeated blocks of same code, use it in this way.
var oldV = txtVar.rawValue;
if(xfa.event.newText == "US"){
txtReminder.rawValue = oldV + "\n ALERT #1."}
else if(xfa.event.newText == "UK"){
txtReminder.rawValue = oldV + "\n ALERT #2."}
else{txtReminder.rawValue = oldV;}
RAGHU.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies