Forums

Different instances of radio buttons, can't select from all

decbuck 21 Nov, 2008
I,

I have used the wizard to select 3 radio buttons and some text boxes. I can only select one box from one radio button at a time. I should be able to select one from all 3.

====
HTML CODE
<DIV class=form_item   >
<DIV class="form_element cf_radiobutton" ><LABEL class=cf_label >What was initial impression of the new website?</LABEL>
<DIV class=float_left ><INPUT class="radio validate-one-required" id=Liked_it15  type=radio value="Liked it" name=radio15 ><LABEL class=radio_label for=Liked_it15 >Liked It</LABEL><BR ><INPUT class=radio id="_Did not like it15"  type=radio value=" Did not like it" name=radio15 ><LABEL class=radio_label for="_Did not like it15" > Did Not Like It</LABEL><BR ><INPUT class=radio id="_no opinion15"  type=radio value=" no opinion" name=radio15 ><LABEL class=radio_label for="_no opinion15" > No Opinion</LABEL><BR ></DIV></DIV>
<DIV class=clear > </DIV></DIV>
<DIV class=form_item   >
<DIV class="form_element cf_radiobutton" ><LABEL class=cf_label >How often do you visit Maynooth GAA website?</LABEL>
<DIV class=float_left ><INPUT class="radio validate-one-required" id="more_than once a week15"  type=radio value="more than once a week" name=radio15 ><LABEL class=radio_label for="more_than once a week15" >More Than Once A Week</LABEL><BR ><INPUT class=radio id="once_a week15"  type=radio value="once a week" name=radio15 ><LABEL class=radio_label for="once_a week15" >Once A Week</LABEL><BR ><INPUT class=radio id=less_often15  type=radio value="less often" name=radio15 ><LABEL class=radio_label for=less_often15 >Less Often</LABEL><BR ></DIV></DIV>
<DIV class=clear > </DIV></DIV>
<DIV class=form_item   >
<DIV class="form_element cf_radiobutton" ><LABEL class=cf_label >What is your main reason for visiting the site?</LABEL>
<DIV class=float_left ><INPUT class="radio validate-one-required" id=latest_news15  type=radio value="latest news" name=radio15 ><LABEL class=radio_label for=latest_news15 >Latest News</LABEL><BR ><INPUT class=radio id=fixtures/results15  type=radio value=fixtures/results name=radio15 ><LABEL class=radio_label for=fixtures/results15 >Fixtures/Results</LABEL><BR ><INPUT class=radio id=other15  type=radio value=other name=radio15 ><LABEL class=radio_label for=other15 >Other</LABEL><BR ></DIV></DIV>
<DIV class=clear > </DIV></DIV>
<DIV class=form_item   >
<DIV class="form_element cf_textbox" ><LABEL class=cf_label >Name(optional)</LABEL><INPUT class=cf_inputbox id=text_13  maxLength=150 size=30 name=text_13 ></DIV>
<DIV class=clear > </DIV></DIV>
<DIV class=form_item   >
<DIV class="form_element cf_textarea" ><LABEL class=cf_label >Comments(optional)</LABEL><TEXTAREA class=cf_inputbox id=text_11 name=text_11 rows=8 cols=80 ></TEXTAREA></DIV>
<DIV class=clear > </DIV></DIV>
<DIV class=form_item   >
<DIV class="form_element cf_textbox" ><LABEL class=cf_label >Email (optional)</LABEL><INPUT class="cf_inputbox validate-email" id=text_14  maxLength=150 size=30 name=text_14 ></DIV>
<DIV class=clear > </DIV></DIV>
<DIV class=form_item   >
<DIV class="form_element cf_button" ><INPUT  type=submit value=Submit ></DIV>
<DIV class=clear > </DIV></DIV>
GreyHead 21 Nov, 2008
Hi decbuck,

This doesn't look like code straight from the wizard, too many quotes are missing.

All your radio buttons have the same name. Each group needs to have a different name (though each button within the group has the same name).

Bob

PS I suggest that you put quotes round the attribute values e.g. class="form_item" and make sure that there are no spaces in any names or ids.
Max_admin 21 Nov, 2008
Hi Bob,

The IE only generates the elements with no quotes, I'm fixing this in the new version so the code is browser independent.

Hi decbuck,

your problem is because all your radios has the same name, the wizard will not make them all with the same name though.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 21 Nov, 2008
Hi Max,

Oh - OK - another reason to avoid IE. . .

Bob
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger