Sunday, 8 September 2013

Jquery UI tabs and radio button as array

Jquery UI tabs and radio button as array

I am using jquery tabs and I have specific requirement for a program I am
writing. My jquery tabs have the exact same form for both tabs so I want
the radio buttons that are for the same name like academic potential to be
put into an array. A brief example :
tab one :
echo '<input type="radio" name="intAcademicPotential[]" value="' . $v . '"
' . set_radio('intAcademicPotential[]', ' . $v . ') . ' />' . $v . ' ';
tab two :
echo '<input type="radio" name="intAcademicPotential[]" value="' . $v . '"
' . set_radio('intAcademicPotential[]', ' . $v . ') . ' />' . $v . ' ';
The problem that I am having is that when I change into the second tab and
choose 1 as the value for the radio and then go to the first tab and on
the same name radio button and choose 2 the the other radio buttons value
disappears from tab two.
Changing the name of the values works, but I need to have both values
inserted into a array. Any tips would be great.

No comments:

Post a Comment