Do you want to: Ask a how-to question
Document Server version: 8.1.3.4 / Docker
We are evaluating OnlyOffice to be the editor in our product. Our use case for OnlyOffice to use it to edit docx file and mark part of the words as form fields using custom plugin.
Plugin is using this code to add inline form field:
plugin.callCommand(() => {
const oDocument = Api?.GetDocument();
const formProps = {
key: Asc.scope.clickedItem.id, // "company_name"
tag: Asc.scope.clickedItem.id,// "company_name"
tip: Asc.scope.clickedItem.text.en, // "Company name"
required: true,
placeholder: Asc.scope.clickedItem.text.en,
comb: false,
multiLine: true,
autoFit: false,
};
oDocument.InsertTextForm(formProps);
}
And later using this method to list forms
this.executeMethod("GetAllForms", null, function (data) {
data.forEach((form) => {
console.log(form); // {Tag: '', Lock: 3, InternalId: '1950'}
});
});
For some reason tag isn’t attached to form at all, and for this, we can’t bind our plugins input fields to form field. What is correct way to add tag to form?