SetPlaceholderText
Sets the placeholder text to the current form.
Can't be set to checkbox or radio button.
Parameters:
Name |
Type |
Description |
sText |
string
|
The text that will be set to the current form. |
Returns:
- Type
-
boolean
Example
Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oComboBoxForm = Api.CreateComboBoxForm({"key": "Personal information", "tip": "Choose your country", "required": true, "editable": false, "autoFit": false, "items": ["Latvia", "USA", "UK"]});
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oComboBoxForm);
oComboBoxForm.SetPlaceholderText("Country");
builder.SaveFile("docx", "SetPlaceholderText.docx");
builder.CloseFile();
Resulting document