4 Replies Latest reply: Feb 22, 2010 11:51 AM by David_Powers RSS

    Radio Buttons w/ Multiple Values on a PHP Form

    pbsum83 Community Member

      Hi,

       

      I have an Online Registration form with several options that each have their own prices.  I want the form results to show the name of each option the user selects, and the total of all the prices combined.  My question is how can I do that when each radio button only allows you to attach one value?  Is there a way to somehow retrieve the option name and price as two separate values?

       

      <input name="option" type="radio" value="Cotton - $10" />

      <input name="option" type="radio" value="Suede - $15" />

      <input name="option" type="radio" value="Leather - Black - $20" />

      <input name="option" type="radio" value="Leather - White - $20" />

       

      For example, if they select 'Leather - Black - $20" I want to be able to retrieve one value of "Leather - Black" and another value of "20.00" (to add to the total price) rather than simply "Leather - Black - $20" in one value.

       

      Any help would be greatly appreciated!  I've only had to deal with one value for each radio button in the past.

       

      Thanks!

       

      Paul