добавить еще один кусок кода:
<script>
cr.api(function (page) {
var fieldStorage = [];
page.waitForAppear('.first-form-1', function (el) {
var form = page.getComponent(el);
form.on('before-submit', function (event) {
event.fields.forEach(field => {
fieldStorage.push({
name: field.name,
value: field.value,
uid: field.uid,
})
})
localStorage.setItem('field', JSON.stringify(fieldStorage));
});
})
page.waitForAppear('.second-form-1', function (el) {
var form = page.getComponent(el);
form.on('before-submit', function (e) {
const fields = JSON.parse(localStorage.getItem('field'));
fields.forEach(field => {
console.log(field)
e.fields.push(field);
})
});
});
})
</script>