Главная
<script type="text/javascript">
cr.api(page => {
page.waitForAppear(`.first-form`, firstForm => {
page.waitForAppear(`.second-form-button`, button => {
button.addEventListener('click', () => {
const apiFields = page.getComponent(firstForm).fields
page.waitForAppear(`.second-form`, secondForm => {
const apiSecondForm = page.getComponent(secondForm)
apiSecondForm.on('before-submit', e => {
apiFields.forEach(apiField => {
if (apiField.isDisabled) return
const {
name,
value,
uid
} = apiField
if (name.includes('Поле-контейнер')) return e.fields.push({
name,
value,
uid
})
})
})
})
})
})
})
})
</script>