Ghost text is changing the caption to gray italics

Avatar

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
mdawn50
Level 3

08-05-2015

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

12-05-2015

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.

Font.Palette.png

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

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

11-05-2015

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

Avatar

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
mdawn50
Level 3

11-05-2015

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

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

10-05-2015

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