I am dynamically showing the radio box values from database on a form.
<input id="edit-info-prog-dates-0" class="form-radio" type="radio" value="0" name="info[prog_dates]">
<label for="edit-info-prog-dates-0" class="option"><div class="test-cost-date">Aug 13, 2012 - Sep 24, 2012</div><div class="currency-w1"><span class="currency-symbol">$</span><span class="currency-cost">350.00</span> <span class="currency-code">CAD</span></div> </label>
I am using the following code to generate the above HTML.
$form['info']['prog_dates'] = array(
'#type' => 'radios',
'#title' => t('Select Dates'),
'#required' => TRUE,
'#options' => $dates,
'#prefix' => '<div id="radios-programdates">',
'#suffix' => '</div>'
);
I want to save the value for the cost in database. If I write the following code, I am only getting the input value '0'.
$form_state['info']['prog_dates']
How do I fetch the cost value, which is inside the <span>
and <label>
in HTML?