CalcBuilder Forum

Error with Radiobutons

Usuario moon_1247 2013-09-19 03:15:21

Hello
I am a new user of CalcBuilder in a Joomla! 2.5.14 installation.
I have a problem with radio buttons. The values ​​are set to JA and NEJ (YES and NO). When I select Ja (Yes) displays the results all the time NEJ (NO) and the result is displayed without counting the value.
If I change to Option List with the same values​​, it works properly

Site:http://test5.klint-joomsign.dk/index.php/prisberegner.html

BR
Niels - DK

Moonsoft support 2013-09-19 09:00:53

Hello,
we can't see any error at your page that could be causing radiobuttons fail. We suggest to check your code when you perform calculations, maybe you're using conditions and you're reasigning the field value by mistake. For ex: if you want to check if the first radiobutton option is 'NEJ' you should use:

if($servervedligehold=="NEJ"){

//rest of your code
}

but if you wrote for ex (with a single equal sign)

if($servervedligehold="NEJ"){

//rest of your code
}

you will be setting the value to NEJ everytime.

If you can't find the origin of your issue, please place a ticket at helpdesk, share your code and we'll take a look.

Thank you, best regards

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!