GetPlaceholderText
Returns the placeholder text from the current form.
Inherited from ApiFormBase.GetPlaceholderText.
Syntax
expression.GetPlaceholderText();
expression - A variable that represents an ApiPictureForm class.
Parameters
This method doesn't have any parameters.
Returns
string
Example
Read the placeholder text shown inside a picture form in a document.
// How do I find out what placeholder text a picture form displays in a document?
// Confirm the hint label set on a picture form in a document.
let doc = Api.GetDocument();
let pictureForm = Api.CreatePictureForm({"key": "Personal information", "tip": "Upload your photo", "required": true, "placeholder": "Photo", "scaleFlag": "tooBig", "lockAspectRatio": true, "respectBorders": false});
let paragraph = doc.GetElement(0);
paragraph.AddElement(pictureForm);
pictureForm.SetImage("https://static.onlyoffice.com/assets/docs/samples/img/onlyoffice_logo.png", Api.MillimetersToEmus(70), Api.MillimetersToEmus(80));
pictureForm.SetPlaceholderText("Picture form");
let placeholderText = pictureForm.GetPlaceholderText();
paragraph = Api.CreateParagraph();
paragraph.AddText("Placeholder text: " + placeholderText);
doc.Push(paragraph);