I'm using this script:
form1.page17.table1.Table7.Row3.DateField6[0]::enter - (JavaScript, client)
this.fontColor = "0,0,0";
this.font.posture = "normal";
form1.page17.table1.Table7.Row3.DateField6[0]::exit - (JavaScript, client)
if (this.isNull)
{
this.fontColor = "153,153,153"; // a gray colour
this.font.posture = "italic";
}
form1.page17.table1.Table7.Row3.DateField6[0]::prePrint - (JavaScript, client)
this.format.picture.value = "";
form1.page17.table1.Table7.Row3.DateField6[0]::postPrint - (JavaScript, client)
this.format.picture.value = "";
form1.page17.table1.Table7.Row3.DateField6[0]::ready:form - (JavaScript, client)
this.execEvent("exit");
this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";
That I gratefully found at this blog: Adding Ghost Text to LiveCycle Designer forms on the adobe.cookbooks.com web site.
I can get the ghost text to work just fine, however when I just used it in a TextField, it changes the caption to the gray italic text. What is causing this and how do I correct?
Thanks,
MDawn
Views
Replies
Total Likes
Hi,
Setting the fontColor (which is the same as font.fill.color.value) will update the font color for the value and, if there is no specific color for the caption will update that as well.
You can either set the color for the caption in the UI, or add the following code to the ready:form event (which sets the caption font to black, normal)
this.caption.font.fill.color.value = "0,0,0";
this.caption.font.posture.value ="normal";
Regards
Bruce
Views
Replies
Total Likes
Thank you for this solution. It does correct the color, but the text is still italics.
You mention setting the characteristics in the UI, but I’m not sure where to do that.
Thanks,
MDawn
Views
Replies
Total Likes
try this:
this.fontColor = "250,153,15"; //Change the font to a color
this.caption.font.fill.color.value = "0,0,0"; //Change the Caption to black
this.caption.font.posture = "normal" //change the caption to normal
this.font.posture = "normal" //change the value to normal
this.font.weight = "bold" //change the value to bold
Views
Replies
Total Likes
Hi Margaret,
Sorry about that, mouslander is right the line "this.caption.font.posture.value = "normal";" should have been "this.caption.font.posture = "normal";" without the .value bit
If you want to do this in Designer, you can with the Font palette.
Click the little arrow and update the Value to italic and the 40% gray (153,153,153) and set the caption to black, normal.
Regards
Bruce
Views
Replies
Total Likes