Расчет столешницы
Узнайте точную стоимость столешницы из камня за 1 минуту
ОТПРАВИТЬ ЗАЯВКУ
Монтаж и доставка в стоимость не входит
3. Укажите размеры в метрах

<script>
$( document ).ready(function() {
    
//Ввод только цифр и точек в поля ввода    
$(document).on('input', '.uc-worktop-calc .slaveform  input[type="text"]', function(){
	this.value = this.value.replace(/[^0-9\.]/g, '');
});    
    
    
setTimeout(function(){  
   $('input[name="worktop-price"]').val('0 руб');
}, 1500);



function divideNumberByPieces(x, delimiter) {
  return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, delimiter || " ");
};


//Отслеживаем изменения в калькуляторе
$(document).on('input change', '.uc-worktop-calc .slaveform  input', function(){
	
	//Получаем форму 
	let formIndex = $('input[name="worktop-form"]').index( $('input[name="worktop-form"]:checked') );
	
	//Получаем мойку
	let worktopSink = $('input[name="worktop-sink"]').index( $('input[name="worktop-sink"]:checked') );
	
	//Получаем размеры
	let sideA = +$('input[name="side-a"]').val();
	let sideB = +$('input[name="side-b"]').val();
	let sideC = +$('input[name="side-c"]').val();
	let sideD = +$('input[name="side-d"]').val();
	let sideF = +$('input[name="side-f"]').val();
	let sideE = +$('input[name="side-e"]').val();
	
	
	let correction = 0;
	
	// 7000 прибавляется в случаи выбора мойки Нержавеющая сталь или Искусственный камень; другая мойка 7000 не прибавляется
	if(worktopSink==0 || worktopSink==1 ) correction = 7000;

	let summ = ( sideA*sideB+sideC*sideD+sideE*sideF)*30000+correction;
    
    summ = +summ.toFixed();
    
    if(summ>1000 && sideA>0 && sideB>0  ){
        $('input[name="worktop-price"]').val( divideNumberByPieces(summ)+' руб');
    };

});    
    
    
let formID='';
//При клике на нашу кнопку
$('.sendform').click(function(e) {e.preventDefault();
    formID = '#' + $(this).closest('.t-rec').attr('id');
    let fullinput=true;   
    $('.t-input-group').removeClass('js-error-control-box');
    $(formID).find('.js-tilda-rule[data-tilda-req="1"]').each(function() {
        
        if($(this).val()==''){$(this).closest('form').find('.t-submit').click(); 

            fullinput=false; 
            return false;
            
        };
    }); 
    if(fullinput){
    $(formID).find('input[type="radio"][data-tilda-req="1"].js-tilda-rule').closest('.t-input-block').each(function() {
    if(!$(this).find('input[type="radio"]').is(':checked')){$(this).closest('form').find('.t-submit').click();

    fullinput=false; return false;  
    };});};
    if(fullinput){
    $(formID).find('input[type="checkbox"][data-tilda-req="1"].js-tilda-rule').each(function() {
    if (!$(this).is(':checked')){ $(this).closest('form').find('.t-submit').click(); 

    fullinput=false; return false;};
    });};
    
    if(fullinput){
        $(formID).find('.slaveform').each(function(){
            $(this).find('.t-input-group').each(function(){
                $(this).addClass('hide-input-mode');
                $(this).clone().appendTo(formID+" .mainform .t-form__inputsbox");   
                if( $(this).hasClass('t-input-group_sb') ){
                    let selectName = $(this).find('select').attr('name');
                    $(formID+' .mainform select[name="'+selectName+'"]').val( $(formID+' .slaveform select[name="'+selectName+'"]').val() );
                };
            });
        });
    //Отправляем данные основной формы       
    setTimeout(function(){  $(formID).find('.mainform .t-submit').click() }, 500);
    };
});
$(formID+' .mainform').delegate(".t-submit", "click", function(){
    setTimeout(function(){
        if ( $(formID+' .mainform .t-form').hasClass("js-send-form-success")){
            $(formID+' .mainform .hide-input-mode').remove();
            $(formID+' .slaveform select option:first').prop('selected', true);
            $(formID+' input').prop('checked', false);
            let recID = formID.replace(/[^0-9]/g, '');t396_init(recID);
        };
    }, 1000);
});    
$(document).on("keydown", ".t-form", function(event) {return event.key != "Enter";});
});
</script>


<style>

.sendform {cursor:pointer}
.mainform .hide-input-mode {
    opacity: 0;
    height: 0;
    max-height: 0;
    min-height: 0;
    pointer-events: none;
    overflow: hidden;
    position: absolute;
    z-index: -10;
}


input[name="worktop-price"] {
    color: #734a34 !important;
    font-size: 27px !important;
    font-weight: 600 !important;
    border: none !important;
    pointer-events: none;
}

</style>


  • Katie:
    Ok, so what is RSVP?
    Support:
    In the context of social invitations, RSVP is a request for a response from the invited person or people. It is an initialism derived from the French phrase Répondez s'il vous plaît, literally "Reply if you please" or "Please reply".
  • Katie:
    How do I find out I've been invited?
    Support:
    A black raven will appear on your windowsill, a paper scroll attached to his leg. You'll need to figure out how to take it off. Everything you'll need to know will be written there. Don't forget to send your raven back.
  • Katie:
    Ok, so what is RSVP?
    Support:
    In the context of social invitations, RSVP is a request for a response from the invited person or people. It is an initialism derived from the French phrase Répondez s'il vous plaît, literally "Reply if you please" or "Please reply".
  • Katie:
    How do I find out I've been invited?
    Support:
    A black raven will appear on your windowsill, a paper scroll attached to his leg. You'll need to figure out how to take it off. Everything you'll need to know will be written there. Don't forget to send your raven back.
Made on
Tilda