Using the Message action to create tooltips
When a tooltip appears by hovering, it is closed when the mouse is moved outside the tooltip's border. When a tooltip appears by clicking, it is closed when you click anywhere outside the tooltip's border. A tooltip can also be dismissed by pressing the Escape key.
You can enhance the appearance of tooltips by using templates. For example, you can use a template to set the color and appearance of the tooltip's text and background. To apply a template by using the TEMPLATE function. A Set Field action sets the template result into a field. The field is referenced in the tooltip message.
You can also format tooltips manually by using HTML. However, the HTML is not validated.
To use the tooltip option in the message action with an HTML template file
Create a template HTML file (for example: file.html) with required placeholder fields (for example: Field1, Field2).
Sample HTML file:<table style="margin: 10px" border="0" valign="top" align="center" width="200">
<tr>
<td class="label">Field 1:</td>
<td class="data">${Field1}</td>
</tr>
<tr>
<td class="label">Field 2:</td>
<td class="data">${Field2}</td>
</tr>
</table>- Create an entry in the AR System Resource Definitions form and in the attachment field, attach the HTML file.
- To test the tooltip, create a sample form with required data fields.
- On the sample form, create an active link.
- To use the template function which points the HTML file, write a set field action. This displays the available placeholder parameters. Map the placeholder fields to the actual fields.
For example: Short Description = TEMPLATE("file.html", "Field2", $Field2$, "Field1", $Field1$) - Write a message action and select Tooltip type and use the field as the message text.
For example: Message text: $Short Description$
- To use the template function which points the HTML file, write a set field action. This displays the available placeholder parameters. Map the placeholder fields to the actual fields.
- To check the tooltip, open the form and perform the action required to trigger the active link.