Expand my Community achievements bar.

Bold/Underline/Italic issue in LifeCycle 7.1

Avatar

Former Community Member
Hello everyone!



Wonder if anybody knows how to apply "bold", "underline" and/or "italic" to the text via JavaScript or FormCalc in LifeCycle 7.1.

I'm trying to do logic on a small piece of text that is inside of a paragraph and at one point I need this smaller piece of text to be "bold" and at another point I need it to be "italic".



Any help would be very much appreciated.
23 Replies

Avatar

Former Community Member
Pam, Slava,



Here it is. I've attached a sample form to demonstrate how to change the value of a rich text field based on the value of another field.



The sample contains two scenarios:



Scenario1 State provided by merged data (form:ready event)

Instead of providing a data file, I decided to specify a default value in the form design. You simply need to change that value to NY or CA before previewing the form. In this scenario, the script is set on the form:ready event of the RichText field. Note the script will remain the same if you choose to merge the form with a data file.



Scenario 2 State selected at runtime by end-user (change event)

In this scenario, the script is set on the change event of the State2 Drop-down list.



The form was created in Designer 7.1 and tested with Adobe Acrobat Pro 7.0.5.



Let me know if you have any questions.



Regards,



Hélène

Adobe Systems

Avatar

Former Community Member
Helene,



I wanted to let you know that I tested your form using Acrobat Professional 8.05 and 7.0.



The first example doesn't change World to italics when CA is entered into the field and tabbing out. It appears as Bold.



The second example works fine in both versions of Acrobat.



I am curious how you attached the file. Is that something you could share?



Thanks for the quick turn around. I am so grateful for your support.



Have a great day!

Pam

Avatar

Former Community Member
Hi Pam,



Yes, that's expected. In the first example, I tried to mimic the use case of a form merged with data where the data remains unchanged. Therefore, there was no need for a script to look up the value of the State field at runtime.



To show the 'italic' version, go back to the Body Pages tab, select the State field and change its default value in the Object palettes Value tab to CA. I admit this can be confusing. In the real world, the field would not specify a default value but rather merged with the state value provided in a data file.



I could have written a script to behave the way you described however I thought the second example kind of did that already.



Does this make sense?



I thought you would ask ;) I found out that uploads are available to Adobe employees.



My pleasure! I'm glad I could help.



Have a great day too.



Hélène

Adobe Systems