Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Making text in Text Field bold

Avatar

Former Community Member
Hello!



I need to make part of the text in Text Field object bold. I tried to write FormCalc script:



c0 = "{body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="2.4.5325.0"}{p style="text-decoration:none"}Hello {span style="font-weight:bold"}World{/span}!!!{/p}{/body}"



$.value.exData.loadXML(c0);



but in PDF Preview was only normal text "Hello World!!!"

("<" and ">" symbols are changed to "{" and "}")



What i do wrong?
2 Replies

Avatar

Former Community Member
P_Dmitry

Is the field set to accept rich text?

Avatar

Former Community Member
Yes.

$.value.exData.contentType = 'text\html'.

It seems i have old XFA API version. Currently i'm using "2.4.5325.0" version. But "XFA Specification" document says that rich text format requires "2.7.8021.0" version. Can somebody test it please?