Hi!
I have this RadioButton that depending on what you choose , the text to display in a TexField, like this:
I Tried something like, but is not working:
//by this being the CheckBox
if (this.rawValue == "yes") {
form1.Subform2.TextField01.access = "readOnly" ;
form1.Subform2.TextField01.rawValue = "you choose yes" ;
//Subform2 is the name of the page where is the textfield, the radio and the textfield are in different pages
}
else if (this.rawValue == "no") {
form1.Subform2.TextField01.access = "readOnly" ;
form1.Subform2.TextField01.rawValue = "you choose no" ;
} else {
form1.Subform2.TextField01.access = "open" ;
// if you neither yes nor no, the textfield is editable and you can fill it with anything you want
}
Any ideas?
Solved! Go to Solution.
Views
Replies
Total Likes
Maybe your script is wrong. Normaly Radiobuttons have the default 1, 2, .. not yes or no.
I think it's the same in your pdf.
You have to do the following:
//you choose yes
if(this.rawValue == 1)
{
Textfeld1.access = "readOnly";
Textfeld1.rawValue = "you choose YES";
//you choose another, in a radiobuttonlist with two options is this this no
}else
{
Textfeld1.access = "readOnly";
Textfeld1.rawValue = "you choose NO";
}
That's all. If nobody click yes or no, the textfield is open. You don't need to script this.
I hope I could help?
Kind regards Mandy
Views
Replies
Total Likes
Maybe your script is wrong. Normaly Radiobuttons have the default 1, 2, .. not yes or no.
I think it's the same in your pdf.
You have to do the following:
//you choose yes
if(this.rawValue == 1)
{
Textfeld1.access = "readOnly";
Textfeld1.rawValue = "you choose YES";
//you choose another, in a radiobuttonlist with two options is this this no
}else
{
Textfeld1.access = "readOnly";
Textfeld1.rawValue = "you choose NO";
}
That's all. If nobody click yes or no, the textfield is open. You don't need to script this.
I hope I could help?
Kind regards Mandy
Views
Replies
Total Likes
thanks! I reviewed my code and there was some typos, I fixed them and now it works!
Views
Replies
Total Likes
You're welcome.
Kind regards Mandy
Views
Replies
Total Likes
Views
Likes
Replies