# How to get value from input and add value in the estimation form?

Hi there!

actually I have a price estimation form in which I have two input fields like input counter with different questions, now my questions is like I don’t know how can I get the value from input and based on that value the price will add in the estimation field, other than that I have completed my estimation calculator just at this point I literally stuck can anyone help me out please???

these are two input counters as you can see in the image…

also here is the code which I used for estimation form and this code is from weblocks, I actually use weblocks to make this functionality:

var complex, budget, interaction, cms_blog, team_members, services_cms, google_analytics, zapier_integration, other_integrations;

// Describe this function…
function Calculation() {
budget = 0;
if (complex == 1) {
budget = (typeof budget == ‘number’ ? budget : 0) + 1350;
} else if (complex == 2) {
budget = (typeof budget == ‘number’ ? budget : 0) + 1850;
} else if (complex == 3) {
budget = (typeof budget == ‘number’ ? budget : 0) + 2450;
}
if (interaction == 1) {
budget = (typeof budget == ‘number’ ? budget : 0) + 200;
} else if (interaction == 2) {
budget = (typeof budget == ‘number’ ? budget : 0) + 350;
} else if (interaction == 3) {
budget = (typeof budget == ‘number’ ? budget : 0) + 450;
}
if (cms_blog == true) {
budget = (typeof budget == ‘number’ ? budget : 0) + 2000;
}
if (team_members == true) {
budget = (typeof budget == ‘number’ ? budget : 0) + 200;
}
if (services_cms == true) {
budget = (typeof budget == ‘number’ ? budget : 0) + 700;
}
budget = (typeof budget == ‘number’ ? budget : 0) + 100;
}
if (zapier_integration == true) {
budget = (typeof budget == ‘number’ ? budget : 0) + 200;
}
if (other_integrations == true) {
budget = (typeof budget == ‘number’ ? budget : 0) + 250;
}
\$(‘[bloc=budget]’).text(budget);
}

\$(“[name=complex]”).on(“input”, function () {
complex = getValueFromInput(“complex”);
Calculation();
});

``````\$("[name=complex]").parent("label.w-radio").on("click", function () {
complex = getValueFromInput("complex");
Calculation();
``````

});
\$(“[name=interaction]”).on(“input”, function () {
interaction = getValueFromInput(“interaction”);
Calculation();
});

``````\$("[name=interaction]").parent("label.w-radio").on("click", function () {
interaction = getValueFromInput("interaction");
Calculation();
``````

});
\$(“[name=cms_blog]”).on(“input”, function () {
cms_blog = getValueFromInput(“cms_blog”);
Calculation();
});

``````\$("[name=cms_blog]").parent("label.w-radio").on("click", function () {
cms_blog = getValueFromInput("cms_blog");
Calculation();
``````

});
\$(“[name=team_members]”).on(“input”, function () {
team_members = getValueFromInput(“team_members”);
Calculation();
});

``````\$("[name=team_members]").parent("label.w-radio").on("click", function () {
team_members = getValueFromInput("team_members");
Calculation();
``````

});
\$(“[name=services_cms]”).on(“input”, function () {
services_cms = getValueFromInput(“services_cms”);
Calculation();
});

``````\$("[name=services_cms]").parent("label.w-radio").on("click", function () {
services_cms = getValueFromInput("services_cms");
Calculation();
``````

});
Calculation();
});

``````\$("[name=google_analytics]").parent("label.w-radio").on("click", function () {
Calculation();
``````

});
\$(“[name=zapier_integration]”).on(“input”, function () {
zapier_integration = getValueFromInput(“zapier_integration”);
Calculation();
});

``````\$("[name=zapier_integration]").parent("label.w-radio").on("click", function () {
zapier_integration = getValueFromInput("zapier_integration");
Calculation();
``````

});
\$(“[name=other_integrations]”).on(“input”, function () {
other_integrations = getValueFromInput(“other_integrations”);
Calculation();
});

``````\$("[name=other_integrations]").parent("label.w-radio").on("click", function () {