elixFormsAPI - update syntax and add prepare global function

This commit is contained in:
2026-02-23 10:28:54 +01:00
parent fd3d0da848
commit 98a6019e32
51 changed files with 1716 additions and 3379 deletions
@@ -29,8 +29,9 @@ runtime:
scripts:
- type: before-request
code: |-
const { prepareEftlDocument } = require("./elixFormsJs.js")
// Copy-pasta your EFTL document below inside the template literals (`)
var eftlDocumentToBeProcessed = String.raw`
prepareEftlDocument(String.raw`
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="isRichiedenteInRS" type="string"][% isRichiedenteInRS = "Utente non ammesso alla compilazione perché non RS del contratto!"; %][/VAR]
[VAR name="responsabiliScientifici" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/VAR]
@@ -51,11 +52,7 @@ runtime:
[%= isRichiedenteInRS %]
[/EFTL]
`;
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);
bru.setVar("elixBase64EftlDocument", base64EncodedDocument);
`);
settings:
encodeUrl: true