How to bold a one word in a textfield | Community
Skip to main content
Level 7
January 5, 2009

How to bold a one word in a textfield

  • January 5, 2009
  • 3 replies
  • 21850 views
I would like to bold a few randomn words in a sentence used as a rawvalue in a textfield.



e.g. "This
word should be bold"



Does someone know how to acheive the above through scripting



Thank you in advance



Aditya
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Niall_O_Donovan
Level 10
January 8, 2009
Hi Aditya,



I am not sure if this is much help to you. I do not know how to script what you are looking for.



However you can change the field format for each of the textfields. In LC Designer 8.2 select the textfield and go to the Object / Field window. Then change the Field Format from "Plain Text Only" to "Rich Text". When using the PDF form, you can change the format of the whole textfield or individual words. For example "Control + B" will give you bold text, "Control + U"; underline, "Control + I"; italic. When a field is active you can press "Control + E" and this will allow you to change the font type and size, etc.



If you are using an earlier version of LC Designer, then you have to make two changes in the Object window. From memory one is in the Field tab and the other in the Binding tab.



Good luck,



Niall
July 28, 2009

I'm having the same issue.  I'd like to have a single word bolded, and I need to accomplish this using a script.  I can find references online to a JavaScript bold method, but I'm at a loss as to how it is applied in LiveCycle.  Anyone have any ideas?

July 28, 2009

Hi Guys,

I wrote a blog entry on how to do this. It's basically around how to set rich text content into a field. This is little tricky and all of the info that you need can be found at

http://blog.pandyaparth.com/?p=65

There is a sample there as well to help you guys.

regards,

Parth Pandya

http://blog.pandyaparth.com

July 29, 2009

Thanks for your help!  It looks like this will do what I need.  Question-is it necessary to import the XML data from somewhere else?  I've cut down the script so the only part I'm using is

txtOutput2.value.exData.loadXML(exdataTemplate.rawValue,1,1);

but I'd prefer it if I didn't have to have a text field floating around my form for the sole purpose of holding XML data.  Is it possible to put the XML data in the script editor and get it to work?  Is some command other than loadXML necessary?  Thanks

Karwan_Mawlood
Level 3
July 24, 2016

LiveCycle ES2 * Adobe LiveCycle Designer ES2

check above for all the properties