Forums

No Validation Message for Radio Group

ironlion37 29 Sep, 2011
Hi,

I've got a form located here:
http://www.kimtindallandassociates.com/request

A little ways down the page is a radio group under the heading "Representing":

<table width="600" border="0" cellspacing="3" cellpadding="3">
  <tr>
    <td width="190"><input type="radio" name="representing" id="representing_plaintiff" title="" value="Plaintiff" class="validate['required']">
<label for="representing_plaintiff">Plaintiff</label></td>
    <td><div class="ccms_form_element cfdiv_text" id="plaintiff_container_div"><input maxlength="150" size="30" class="" title="" type="text" value="" name="plaintiff" />
<div class="clear"></div><div id="error-message-representing"></div></div></td>
  </tr>
  <tr>
    <td><input type="radio" name="representing" id="representing_defendant" title="" value="Defendant" class="validate['required']">
<label for="representing_defendant">Defendant</label></td>
    <td><div class="ccms_form_element cfdiv_text" id="plaintiff_container_div"><input maxlength="150" size="30" class="" title="" type="text" value="" name="defendant" />
<div class="clear"></div><div id="error-message-representing"></div></div></td>
  </tr>
  <tr>
    <td><input type="radio" name="representing" id="representing_other" title="" value="Other" class="validate['required']">
<label for="representing_other">Other</label></td>
    <td><div class="ccms_form_element cfdiv_text" id="plaintiff_container_div"><input maxlength="150" size="30" class="" title="" type="text" value="" name="other" />
<div class="clear"></div><div id="error-message-representing"></div></div></td>
  </tr>
</table>

My problem is that the while the form is successfully requiring the selection of one of the radios, it's not displaying any error message to the user if it's skipped over. The ten fields above the radio group are properly displaying error messages. It's something about the radio group. And I'm having the same problem with the check boxes under "Instructions".

Thanks for any help you can provide. I'll be buying you a beer on this one : )
ironlion37 29 Sep, 2011
Oh and one other question: once I've added custom html to my form and can no longer use the wizard, how do access the email template for the form?
GreyHead 29 Sep, 2011
Hi ironlion37,

First the custom HTML option only blocks the Preview tab - the events tab is still accessible from the Wizard Edit.

I'm not certain but in CFv3 for the validate one required option to work the inputs had to share a common parent tag - and after you've added the table code this is no longer true.

I did write a hack to get round this but I think it was for CFV3. Best take a look and see if you can simplify the HTML first.

Bob
ironlion37 30 Sep, 2011
Hi Greyhead,

I went so far as to take a fresh code snippet for a radio group created by the wizard:

<div class="ccms_form_element cfdiv_radio" id="label_text_container_div"><label>Label Text</label><input type="radio" name="input_radio_0" id="input_radio_0_no" title="" value="No" class="validate['required']">
<label for="input_radio_0_no">No</label>
<input type="radio" name="input_radio_0" id="input_radio_0_yes" title="" value="Yes" class="validate['required']">
<label for="input_radio_0_yes">Yes</label>
<input type="radio" name="input_radio_0" id="input_radio_0_maybe" title="" value="Maybe" class="validate['required']">
<label for="input_radio_0_maybe">Maybe</label>
<div class="clear"></div><div id="error-message-input_radio_0"></div></div>


No change. That code is live at http://www.kimtindallandassociates.com/test under the heading Representing.

The thing is that it is recognizing that validation is required, it just won't show the error message.

Joomla 1.5.23 | Mootools Upgrade On | Chronoforms 4.0 RC1.9
GreyHead 30 Sep, 2011
Hi ironlion37,

This looks like the RocketTheme problem. Please try turning off Input Formatting in the template advanced options box.

Bob
ironlion37 30 Sep, 2011
Who's the man? You are.

That was it. One other question - any idea where to change the error text from "Please select one radio" to "Please select one option"?

Thanks, and I've got a marker in my calendar to buy you that beer when I get paid next 🙂
GreyHead 01 Oct, 2011
Hi ironlion37,

The validation texts are in components/com_chronoforms/js/formcheck/lang/en.js

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