<script type="text/javascript">
(function(_,r,e,t,a,i,l){_['retailCRMObject']=a;_[a]=_[a]||function(){(_[a].q=_[a].q||[]).push(arguments)};_[a].l=1*new Date();l=r.getElementsByTagName(e)[0];i=r.createElement(e);i.async=!0;i.src=t;l.parentNode.insertBefore(i,l)})(window,document,'script','https://collector.retailcrm.pro/w.js','_rc');
_rc('create', 'RC-58694042979-2'); // это ключ от CRM аккаунта
_rc('send', 'pageView');
</script>
<script type="text/javascript">
$(document).ready(function() {
$('a.component-button').on('click', function() {
var progress = $(this).attr('data-modal-id');
if(progress == 'done48767') {
//////функция нижняя кнопка
$(function() {
$('.form-element').submit(function() {
_rc('send', 'order', {
'name': $(this).find('input[name="form[131660]"]').val(),
'phone': $(this).find('input[name="form[674204]"]').val(),
'customlead_for_site': 'site.ru',
});
return false;
})
})
////
} else if (progress = 'done27309') {
//////первая форма отправки
$(function() {
$('.form-element').submit(function() {
var button = document.querySelector('input[name="form[771611]"]:checked').value;
var color = null;
if(button == 'Белый'){
color = 'qFKoR7ETgK9EQiH99XsXJ0';
} else {
color = '6vPnHI0RjsnKO7iKGmEYu2';
}
_rc('send', 'order', {
'name': $(this).find('input[name="form[273045]"]').val(),
'phone': $(this).find('input[name="form[666702]"]').val(),
'customlead_for_site': 'site.ru',
'itemId': color,
});
return false;
})
})
////
}
});
});
</script>
<a class="component-button form-field-submit effect--opacity weight--medium size--medium filled rounded wide" data-modal-id="done48767">