I'm looking for a way to change color of the font when a certain person reviews the document. After the document has been signed then the reviewer goes in to make the changes. Is there a way for when the reviewer types in the changes the text color is different??
Solved! Go to Solution.
Views
Replies
Total Likes
The attached contains examples of changing text field properties through script. For example, to change font colour.
// form1.page1.subform1.cb4::change - (JavaScript, client)
if (this.rawValue == 1) {
xfa.resolveNode("form1.page1.subform1.tf.font.fill.color").value = "255,255,0";
}
else {
xfa.resolveNode("form1.page1.subform1.tf.font.fill.color").value = "0,0,0";
}
Steve
Views
Replies
Total Likes
You can change the font color dynamically by using the syntax below..
FieldName.font.fill.color.value = "0,0,255"; //(Provide the RGB numbers).
Thanks
Srini
Views
Replies
Total Likes
But is there a way to assign that color to a certain user?
Views
Replies
Total Likes
You can. But the PDF should know who the user is when the form is opened.
For example, if you are using a server side rendering, you can pass the logged in user info in the data file before rendering.
If you are not using the Server side rendering, then you can assign a value to a hidden field when the form is submitted to a reviewer. In the initialize event of the field, you can check the the hidden field value and if it matches to reviewer, then you can change the font color.
If you want to do the second approach, the you need to make sure you set the "Preserve scripting changes to form when saved" to Automatically in the File menu -> Form Properties and in the Default tab.
Thanks
Srini
Can you maybe post an example script. I'm still somewhat new with all this LiveCycle scripting stuff. Thanks.
Views
Replies
Total Likes
The attached contains examples of changing text field properties through script. For example, to change font colour.
// form1.page1.subform1.cb4::change - (JavaScript, client)
if (this.rawValue == 1) {
xfa.resolveNode("form1.page1.subform1.tf.font.fill.color").value = "255,255,0";
}
else {
xfa.resolveNode("form1.page1.subform1.tf.font.fill.color").value = "0,0,0";
}
Steve
Views
Replies
Total Likes
Ok I got the script to work so is there a way to possibly lock in the color of the text that is already there and then when new text is typed - that can be a different color?
Views
Replies
Total Likes
Views
Likes
Replies