Hi.
I have a read-only text box that I want to have bold and non-bold text in. I found a piece of code that seems like it will work to make certain sections bold, and am trying it out in a few different places in my javascript (again, way new at all this).
I can't get it to work, and am not sure if it's where I'm placing it in my script, or if the settings in the text field are overriding it? Currently the text field is set as Helvetica, and my code looks like this:
(function () {
// Get the value of the Time field
var v1 = getField("Time").valueAsString;
//document.write("Time".bold())
// Get the value of the Description field
var v2 = getField("Call Activity/Description").valueAsString;
// Get a reference to the Log field and get its value
var f3 = getField('Calls and Activity');
var v3 = f3.valueAsString;
// Append the Time and Description text to the Log
// starting on a new line
// v3 = old log value
// \r = carriage return
// v1 = time value
// v2 = description
f3.value = v3 + "\r" + v1 + " - " + v2;
})();
I need the Time data to appear bold, and am trying this code: document.write("Time".bold()) but am not sure where to put it.
Any suggestions?
Martha
More information about using JavaScript to create rich text field values is in the Acrobat JavaScript reference.