Я использую Form.io (http://formio.github.io/formio.js/app/examples/customendpoint.html
// Triggered when they click the submit button.
form.on('submit', function(submission) {
console.log(submission);
alert('Submission sent to custom endpoint. See developer console.');
return fetch('https://hookb.in/ZrRRbJBe', {
body: JSON.stringify(submission),
headers: {
'content-type': 'application/json'
},
method: 'POST',
mode: 'cors',
})
.then(response => {
form.emit('submitDone', submission)
response.json()
})
});
});
, и я получаю ответ JSON в журнале консоли. Я пытаюсь вместо того, чтобы поместить его в журнал консоли, я хочучтобы поместить данные в формате PDF. Я использовал код
<div class="entry">
<h1>{{data.page1Text}}</h1>
<div class="body">
{{body}}
</div>
Но все же он приходит как {{data.page1Text}}
, любые способы, которые я могу использовать этот JSON, чтобы поместить в формате PDF или положить в EXCELвместо того, чтобы положить в Консоль.