Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

how to highlight floating field entry

Avatar

Level 6

Good day,

I would like a floating field entry to be highlighted.  How can I do this?  I cannot figure this out and I am not sure if it can be done.  Your help is appreciated.

Thank you.

 

8 Replies

Avatar

Employee

you may do it with the script below. Suppose the name of floating field is "temp".

 

form1.temp.ui.oneOfChild.border.fill.color.value = "255, 255, 255";

 You may change the RGB value as per your requirement. 

Avatar

Level 6

Good day,

It doesn't seem to be working.  I tried your reply and also looked at PulkitJain's attachment.  I also tried the action builder as well and it doesn't highlight the floating field either.  This is what the action builder enters in the enter event of the floating field (responddate):

this.resolveNode("$").ui.oneOfChild.border.fill.color.value = "255, 255, 0";

 

Avatar

Employee

I just tried the following script on the mouseEnter event, and it is working as expected for me:

 

 form1.#subform[0].DecimalField1::mouseEnter - (JavaScript, client)


xfa.resolveNode("form1.#subform.DecimalField1").ui.oneOfChild.border.fill.color.value = "255, 255, 0";

Here is the output:

 

Mayank_Tiwari_0-1641134100633.png

 

Avatar

Level 6

Yes, this is what I want, but only in the floating field that is in the sentence below.  See attached snips.  Instead of having the respond box (responddates) highlighted on mouse enter,  I need the floating field in the sentence below to be highlighted after it's entered in the sentence.  The form works like this...The date entered in the "respond date" block is automatically entered into the sentence below via the floating field (responddate).  I need that date in the sentence to be highlighted in order to bring the users attention to the deadline.

islandgirl23_1-1641142680965.png

 

 

 

islandgirl23_0-1641142361254.png

 

 

Avatar

Employee

Looks like applying color property is not supported for Floating fields, as their purpose is to display only the dynamic text. You may use a Text field with no borders in place of a Folating field. 

Avatar

Employee Advisor

@islandgirl23 

This helpdoc[0] provides good information on different options to highlight the current field that a form filler is working with or highlight fields that a form filler is required to fill.

 

For example, add an enter event to the Name field:
Name.border.edge.color.value = "0,0,255";

For example, add an exit event to the Name field:
Name.border.edge.color.value = "255,255,255";

 

Not specific to any particular fieldtype but you may implement the same on any field.

 

Hope it helps!

 

[0] - https://help.adobe.com/en_US/AEMForms/6.1/DesignerScriptingBasics/WS92d06802c76abadb57cc1b6e12a92343... 

Avatar

Level 10

You can modify the xml source of your text to highlight the text portion of the floating field. It's just some needle work, but works fine. 

 

Here's a sample of the xHTML you'll need.

<exData contentType="text/html">
                  <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="letter-spacing:0in;background-color:#ffffff;">Lorem<span style="xfa-spacerun:yes"> </span><span style="font-size:12pt;font-weight:bold;background-color:#ff0000"><span xfa:embedType="uri" xfa:embedMode="raw" xfa:embed="#floatingField000041"/></span> Ipsum Dolor</p></body>
               </exData>

The result then looks this way, where the value 123 is populated from a floating field.

radzmar_0-1641201217725.png

 

 

Avatar

Level 6

Great!.  Thank you.  So, can you provide step by step of how I can accomplish this using Livecycle?