I'm using Javascript to set the actions. I need to hide a text field if the value of a field in another sub-form is null.
- tried checking the value of the other field for null - doesn't work
- tried setting a variable str2 where I know the value of the other field is available then checking that variable when I initialize the text field - doesn't work
What am I missing?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi.
Try this in the originating sub form referring to the text field (X).
if (this.rawValue = 1)
{
X.presence = "visible";
}
else if (this.rawValue = null)
{
X.presence = "hidden";
}
Views
Replies
Total Likes
Hi,
It depends, seems like there might be an error in your coding. Maybe an error in a Reference_Syntax or something like that...
Could you provide an image of your hierarchy + your snippet code so it will be easier to help you!
Views
Replies
Total Likes
Hi.
Try this in the originating sub form referring to the text field (X).
if (this.rawValue = 1)
{
X.presence = "visible";
}
else if (this.rawValue = null)
{
X.presence = "hidden";
}
Views
Replies
Total Likes
Thanks for the suggestion! I did end up using similar code and it worked once I had set the variable correctly. Learned about a new function that allowed the field value to be set - it was not being set properly on the change event.
fieldname.rawValue = xfa.event.newText
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies