GetTag
返回当前表单的标签属性。
继承自 ApiFormBase.GetTag。
语法
expression.GetTag();
expression - 表示 ApiComboBoxForm 类的变量。
参数
此方法没有任何参数。
返回值
string
示例
读取文档中附加到组合框表单的标签。
// How do I retrieve the tag of a combo box form in a document?
// Verify that the expected tag value is stored on the form for lookup or filtering purposes.
let doc = Api.GetDocument();
let comboBoxForm = Api.CreateComboBoxForm({"tag" : "Country", "key": "Personal information", "tip": "Choose your country", "required": true, "placeholder": "Country", "editable": false, "autoFit": false, "items": ["Latvia", "USA", "UK"]});
let paragraph = doc.GetElement(0);
paragraph.AddElement(comboBoxForm);
let tag = comboBoxForm.GetTag();
paragraph = Api.CreateParagraph();
paragraph.AddText("Form tag: " + tag);
doc.Push(paragraph);