Radio button calculations [was: how can i validate a form so at least one of three text fields...]


sorry trouble folks again client wants radio buttons 3 freight options, got the  radio fields in html, spry validation working fine that's far got

 

<span id="spryradio1"><span id="spryradio2">

         <input type="radio" name="radio_group1" value="10" />radio group 1 - value 1<br />

         <input type="radio" name="radio_group1" value="15" />radio group 1 - value 2<br />

         <input type="radio" name="radio_group1" value="0" />radio group 1 - value 3<br />

         <br />

         <span class="radiorequiredmsg">please make selection.</span></span><br />

       </span>

the php code;

 

switch($_post['radio_group1']) {

        case "10":

            $value = "radio group 1 - value 1 has been selected.";

            break;

        case "15":

            $value = "radio group 1 - value 2 has been selected.";

            break;

        case "0":

            $value = "radio group 1 - value 3 has been selected.";

            break;

        default:

            $value = "no radio has been selected radio group 1";

    }

 

 

the code below calculating total can't work either;

 

$totalcost = ($chardonnay_2011_bottles * 20 + $chardonnay_2011_cases * 204) + ($pino_gris_2011_bottles * 21 + $pino_gris_2011_cases * 228) + ($sauvigon_blanc_2011_bottles * 20 + $sauvigon_blanc_2011_cases * 204) + ($riesling_2012_bottles * 20 + $riesling_2012_cases * 204) + ($pinot_noir_2009_bottles * 25 + $pinot_noir_2009_cases * 250) + ($radio_group1 * 10 + $radio_group1_15 * 15 + $radio_group1_0 * 0);

 

grateful help.

cheers

this different issue, needs in thread of own.

 

you need give more information. "it doesn't work" meaningless. happens? expect happen?



More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support