Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Checkbox Help

Avatar

Level 1

Hey, I'm very much a beginner at all of this. I am trying to put a checkbox on my form and if you check the box, a section of text becomes striked through. If you leave it unchecked, the text does not change. Here is what I've written that does not seem to be working...

if (CheckBox1.rawValue==true)

TextField1.font.lineThrough= "2";

else

TextField1.font.lineThrough= "0";

The language is set to JavaScript. One thing I'm not sure about is the "Show" value in the Script Editor. How do you know whether to choose, Enter, Initialize, Calculate, Validate...etc. Any advice would be helpful, thanks!

6 Replies

Avatar

Level 10

Make sure to save your form as Dynamic PDF.

That should work..

Nith

Avatar

Level 1

I did that and it's still not working. Let me elaborate on what I'm trying to do.

On my form, I have a paragraph of text. There are two different types of organizations my company works with, for one of the types this paragraph needs to be striked through, for the other it needs to be plain.

I have placed this paragraph in a textfield as to link it to the checkbox. However, the script I posted above is not working even though I saved as a Dynamic pdf. Thanks for your help!

Avatar

Level 10

I have tried a sample and its working.

You can view my sample PDF attached here.

Nith

Avatar

Level 1

Thank you so much! I'd really love to see your sample but when I click on it I'm getting the message that I don't have permission to view the document.

Avatar

Level 10

Please share you email Id so that I can send you the sample file directly.

My email: nith.mof@gmail.com

Nith

Nithiyanandam Dharmadass

Ministry of Finance

Tel. +973 17575809

nith@mof.gov.bh

www.mof.gov.bh

P.O Box 333, Manama, Kingdom of Bahrain

Please consider the environment before printing this email

Avatar

Level 1

Hey,

Sorry it's been a few days but I would still love to see the sample file if

possible. Thank you!