I'm so close to create my form i need. But there is still a "bug". I wan't create a form where a customer can calucate how expensive something will be. I'm sure there are a lot of shorter ways to build the whole thing, but this is not the question. The problem is the calucation:
When you choose: CMS it sets the Price 100, the you add "Contao" and it sets correctly to 350. But then when you no choose "Statisch" the Amount of 250 of the "Contao" isn't override to 0 again.
I hope you understand what i mean :D complicated to explain. I thank you a lot for you help.
I think the Problem has to be in this part:
$(this).change(function(){
var ifCMS_val = $('input[name="ifCMS"]:checked').val();
var chooseCMS_val = $('input[name="chooseCMS"]:checked').val();
ifCMS_cost = 0;
chooseCMS_cost = 0;
if(ifCMS_val == "ifCMSyes")
{
ifCMS_cost = 100;
chooseCMS_cost = 0;
}
else if(ifCMS_val == "ifCMSno"){
ifCMS_cost = 0
chooseCMS_cost = 0;
}
if(chooseCMS_val == "Contao"){
chooseCMS_cost = 250;
}
else
{
chooseCMS_cost = 0;
}
summe = chooseCMS_cost ;
$('#summehtml').html(summe)
});