Answer the question
In order to leave comments, you need to log in
How to call crm form Bitrix 24 when closing the site?
In Bitrix24 out of the box there are several scripts for launching the form code below
on the page
<script id="bx24_form_inline" data-skip-moving="true">
(function(w,d,u,b){w['Bitrix24FormObject']=b;w[b] = w[b] || function(){arguments[0].ref=u;
(w[b].forms=w[b].forms||[]).push(arguments[0])};
if(w[b]['forms']) return;
var s=d.createElement('script');s.async=1;s.src=u+'?'+(1*new Date());
var h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);
})(window,document,'https://missp.bitrix24.ru/bitrix/js/crm/form_loader.js','b24form');
b24form({"id":"2","lang":"ru","sec":"ehiv9q","type":"inline"});
</script>
<script id="bx24_form_button" data-skip-moving="true">
(function(w,d,u,b){w['Bitrix24FormObject']=b;w[b] = w[b] || function(){arguments[0].ref=u;
(w[b].forms=w[b].forms||[]).push(arguments[0])};
if(w[b]['forms']) return;
var s=d.createElement('script');s.async=1;s.src=u+'?'+(1*new Date());
var h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);
})(window,document,'https://missp.bitrix24.ru/bitrix/js/crm/form_loader.js','b24form');
b24form({"id":"2","lang":"ru","sec":"ehiv9q","type":"button","click":""});
</script><button class="b24-web-form-popup-btn-2">Мы перезвоним вам</button>
<script id="bx24_form_delay" data-skip-moving="true">
(function(w,d,u,b){w['Bitrix24FormObject']=b;w[b] = w[b] || function(){arguments[0].ref=u;
(w[b].forms=w[b].forms||[]).push(arguments[0])};
if(w[b]['forms']) return;
var s=d.createElement('script');s.async=1;s.src=u+'?'+(1*new Date());
var h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);
})(window,document,'https://missp.bitrix24.ru/bitrix/js/crm/form_loader.js','b24form');
b24form({"id":"2","lang":"ru","sec":"ehiv9q","type":"delay","delay":5});
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question