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???
Here is my Read Only Link:
https://preview.webflow.com/preview/fig-2-flow?utm_medium=preview_link&utm_source=designer&utm_content=fig-2-flow&preview=0448feb92c5eca3132ad0ecb6b814786&pageId=63d211e9a42a7b175b602068&workflow=preview
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;
}
if (google_analytics == true) {
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 () {
clickedRadioButtonValue = $("input", this).val();
complex = getValueFromInput("complex");
Calculation();
});
$(“[name=interaction]”).on(“input”, function () {
interaction = getValueFromInput(“interaction”);
Calculation();
});
$("[name=interaction]").parent("label.w-radio").on("click", function () {
clickedRadioButtonValue = $("input", this).val();
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 () {
clickedRadioButtonValue = $("input", this).val();
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 () {
clickedRadioButtonValue = $("input", this).val();
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 () {
clickedRadioButtonValue = $("input", this).val();
services_cms = getValueFromInput("services_cms");
Calculation();
});
$(“[name=google_analytics]”).on(“input”, function () {
google_analytics = getValueFromInput(“google_analytics”);
Calculation();
});
$("[name=google_analytics]").parent("label.w-radio").on("click", function () {
clickedRadioButtonValue = $("input", this).val();
google_analytics = getValueFromInput("google_analytics");
Calculation();
});
$(“[name=zapier_integration]”).on(“input”, function () {
zapier_integration = getValueFromInput(“zapier_integration”);
Calculation();
});
$("[name=zapier_integration]").parent("label.w-radio").on("click", function () {
clickedRadioButtonValue = $("input", this).val();
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 () {
clickedRadioButtonValue = $("input", this).val();
other_integrations = getValueFromInput("other_integrations");
Calculation();
});