Answer the question
In order to leave comments, you need to log in
How to pass a variable from js to Mod X Evo to send it to mail in FormIt?
The site on ModX Evo has a calculator in JS, here is a snippet of its code
$(".calc .more").click(function(e){
var title = "Расчет стоимости обслуживания";
//Форма налогообложения
var _nalog = $(".calc input[name=nalog]:checked").val();
//Род деятельности
var _occupation = $(".calc input[name=occupation]:checked").val();
//Документов в месяц
var _docs = $(".calc input[name=docs]").val();
//Сотрудиков
var _personal = $(".calc input[name=personal]").val();
if(_docs=="1") _docs_txt="до 20";
if(_docs=="2") _docs_txt="20-40";
if(_docs=="3") _docs_txt="40-60";
if(_docs=="4") _docs_txt="60-100";
if(_docs=="5") _docs_txt="100-150";
if(_docs=="6") _docs_txt="от 150";
if(_nalog=="1") _nalog_txt="УСН,доходы(6%)";
if(_nalog=="2") _nalog_txt="УСН,доходы-расходы(15%)";
if(_nalog=="3") _nalog_txt="ОСН,НДС(18%,10%,0%)";
if(_occupation=="1") _occupation_txt="Услуги";
if(_occupation=="2") _occupation_txt="Торговля";
if(_occupation=="3") _occupation_txt="Производство";
if(_occupation=="4") _occupation_txt="Строительство";
var note = "\nФорма налогообложения: "+_nalog_txt+"\nРод деятельност: "+_occupation_txt+" \nКол-во документов: "+_docs_txt+" \nСотрудников: " + _personal + "\nПодсчитанная стоимость: " + $(".calc-total div").text();
$(".form-order input[name=type]").val("calc");
showOrderForm(title, note);
e.preventDefault();
});
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