Form sends data to server but does not submit to next page (nor hubspot property)
Hi,
I really need help.
I am not a dev, but I have created a calculator tool with hubspot forms. On page 5 of my tool, when clicking "next", it does not go to the next page. Fields/properties are being correctly calculated and there is no error.
I have consulted with developers from my team but cannot find the issue.
Upon inspecting I see that all the correct data is being sent to the servers but I do not see the properties updated in hubspot.
Here is my issue: http://www.leanix.net/en/business_case_calculator_tool-5
For testing purposes, you can start here: http://www.leanix.net/en/business_case_calculator_tool .
Thank you very much for any help you can give me
In the form, I have the fields hidden that I wish to calculate.
Code is:
//page 5
<script type="text/javascript">
var result = 0;
function calculateResult(){
// calculate the result annual savings run cost
result = parseFloat($('input[name="savings_unused_licenses"]').val()) / 100 *
parseFloat($('input[name="annual_run_cost"]').val()) +
parseFloat($('input[name="savings_on_non_license_run_cost_due_to_consolidating_applications"]').val()) / 100 *
parseFloat($('input[name="annual_run_cost"]').val());
// write the result into the hidden result field in the form ...
$('input[name="annual_savings_on_run_cost"]').val(result);
}
function calculateResult1(){
// calculate the result annual savings build cost
result = parseFloat($('input[name="percentage_estimated_of_projects_to_be_non_compliant"]').val()) / 100 *
parseFloat($('input[name="total_budget_it_build_projects"]').val());
// write the result into the hidden result field in the form ...
$('input[name="annual_savings_on_build_cost"]').val(result);
}
function calculateResult2(){
// calculate the result man days cleansing data
result = parseFloat($('input[name="working_weeks_per_year"]').val()) *
parseFloat($('input[name="hours_per_week_spent_recording_and_cleansing_data"]').val()) *
parseFloat($('input[name="number_employees_recoding_and_cleansing_data"]').val());
// write the result into the hidden result field in the form ...
$('input[name="man_days_per_year_cleansing_data"]').val(result);
}
function calculateResult3(){
// calculate the result man days cleansing data
result = parseFloat($('input[name="c10"]').val()) + parseFloat($('input[name="c11"]').val());
// write the result into the hidden result field in the form ...
$('input[name="c9"]').val(result);
}
function calculateResult4(){
// calculate the result man days cleansing data
result = parseFloat($('input[name="b10"]').val()) + parseFloat($('input[name="b11"]').val());
// write the result into the hidden result field in the form ...
$('input[name="b9"]').val(Math.floor(result+''));
}
function calculateResult5(){
// calculate the result man days cleansing data
result = parseFloat($('input[name="man_days_per_year"]').val()) * parseFloat($('input[name="cost_per_man_day"]').val());
// write the result into the hidden result field in the form ...
$('input[name="c20"]').val(result);
}
function calculateResult6(){
// calculate the result man days cleansing data
result = parseFloat($('input[name="man_days_per_year_cleansing_data"]').val()) * parseFloat($('input[name="cost_per_man_day"]').val());
// write the result into the hidden result field in the form ...
$('input[name="c21"]').val(result);
}
function calculateResult7(){
// calculate the result man days cleansing data
result = parseFloat($('input[name="man_days_per_year_creating_reports"]').val()) * parseFloat($('input[name="cost_per_man_day"]').val());
// write the result into the hidden result field in the form ...
$('input[name="c22"]').val(result);
}
function calculateResult8(){
// calculate the result man days cleansing data
result = parseFloat($('input[name="man_days_per_year_working_on_ea"]').val()) * parseFloat($('input[name="cost_per_man_day"]').val());
// write the result into the hidden result field in the form ...
$('input[name="c23"]').val(result);
}
</script>
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
hbspt.forms.create({
css: '',
portalId: '2570476',
formId: '4edbc517-a676-4a3f-af7d-470172c4daf3',
onFormSubmit($form, ctx) {
//debugger;
calculateResult();
calculateResult1();
calculateResult2();
calculateResult3();
calculateResult4();
calculateResult5();
calculateResult6();
calculateResult7();
calculateResult8();
}
});
</script>
Form sends data to server but does not submit to next page (nor hubspot property)
I've tried to submit the form with some custom data and the POST to https://forms.hubspot.com/submissions/v3/public/submit/formsnext/multipart/2570476/4edbc517-a676-4a3f-af7d-470172c4daf3 got me following response: