Why is LiveCycle showing "visible" in my conditionally hidden text field?

jrob12488 18-09-2015

This is driving me crazy! It's also showing the RGB colors if I have those specified.

819558_pastedImage_0.png

It's preventing me from doing a lot of stuff the way I want it. Here's my code (under calculate event):

if (Rush.rawValue==1) then Reason.presence = "visible" else Reason.presence = "invisible" Reason.rawValue = " " endif;

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (1)

Answers (1)

jrob12488 21-09-2015

I was able to get this question answered my Magus069 in another thread:

"Calculate event is set to purpose of setting the value's field for the user.

So the last line of code in the calculate event is the value inserted in the field...

So depends on what code you have written, this is what it returns"

So my solution is the put the changes in a different order. In the above example for simplicity I didn't mention that I was creating ghost text, so I actually changed the order of the properties when this would happen.

Ex:

Correct way: if ($.rawValue eq "0") then Reason.fontColor = "150,150,150" Reason.rawValue = "Please enter a reason for the rush" endif

Wrong way: if ($.rawValue eq "0") then  Reason.rawValue = "Please enter a reason for the rush" Reason.fontColor = "150,150,150" endif

Thanks Magus!