documentgenerator.template.add
documentgenerator.template.add(fields)
The method adds new template. Returns the same data as when calling the documentgenerator.template.get() on a new template.
File content (parameter file
) can be passed via two ways:
- In the POST query, as base64-encoded (
fields[file]
); - Without encoding in multipart/form-data (as simple
file
);
Because the UI must be developed independently, field visibility settings (parameter fields[users]
) are required for the application itself. The same applies to the sort index (parameter fields[sort]
) and activity (parameter fields[active]
).
All templates, created via this method are attached to REST module and single provider \Bitrix\DocumentGenerator\DataProvider\Rest
.
Parameters
Parameter | Description |
---|---|
fields | array of template fields, among which:
|
Examples
© «Bitrix24», 2001-2024