SetTipText
Sets the tip text to the current form.
Inherited from ApiFormBase.SetTipText.
Syntax
expression.SetTipText(sText);
expression - A variable that represents an ApiTextForm class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| sText | Required | string | Tip text. |
Returns
boolean
Example
Add a tooltip hint to a text form in a document.
// How do I provide guidance to users about what to enter in a text form in a document?
// Guide users by displaying a short hint when they hover over a text form in a document.
let doc = Api.GetDocument();
let textForm = Api.CreateTextForm({"key": "Personal information", "required": true, "placeholder": "First name", "comb": true, "maxCharacters": 10, "cellWidth": 3, "multiLine": false, "autoFit": false});
let paragraph = doc.GetElement(0);
paragraph.AddElement(textForm);
textForm.SetTipText("Enter your first name");
let tipText = textForm.GetTipText();
paragraph = Api.CreateParagraph();
paragraph.AddText("Tip text: " + tipText);
doc.Push(paragraph);