validate-one-required not working for me

Post any questions you may have here

validate-one-required not working for me

Postby Bullfn33 on Thu Jul 03, 2008 11:57 pm

Hi, I'm brand new to Joomla and just installed ChronoForms v2.5 J1.5 RC3.1.

I'm having problems with the validate-one-required for a group of radio buttons. When I press submit it says to select one of the above options on every radio button even though one is selected(10 groups of 2) for each group.

All groups are entered into the validate-one-required text box.

Any idea what's wrong here? Thanks!
Bullfn33
Junior Boarder
 
Posts: 39
Joined: Thu Jul 03, 2008 11:31 pm

Re:validate-one-required not working for me

Postby GreyHead on Fri Jul 04, 2008 11:05 am

Hi Bullfn33,

There is a bug in the current version of the validation.js files. If you search the forums here you'll find a fix for it - and I think I posted an amended version of the moovalidation.js file for Joomla1.5.x a few days back

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3253
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:validate-one-required not working for me

Postby Bullfn33 on Fri Jul 04, 2008 8:18 pm

Still not getting it to work for me.

I used this thread to troubleshoot
http://www.chronoengine.com/component/o ... itstart,0/

I downloaded the mooValidation.js fix and uploaded it and then added in the class="validate-one-required" to the last radio in each group such as
Code: Select all
<div>
          <input type="radio" value="ECU" name="Game_1" style="font-size: 10pt"></font></b></td>
          <td width="2%" align="center" bgcolor="#D8D8C5">
          <input class="CngNu" type="text" name="Game_1_Confidence" size="2" value="1" style="text-align: center" onblur="CngNu(this);"><br/></td>
          <td width="1%" align="center" bgcolor="#D8D8C5">
          <p align="center"><b><font face="Arial">
          <input type="radio" name="Game_1" value="VT" class="validate-one-required"></div></font></b>


I was not sure if we are suppose to use the validation library prototype or mootools but I tried both. I didn't include anything in the validate-one-required box but also tried it with the field names. I'm getting the same problems. Am I missing something?
Bullfn33
Junior Boarder
 
Posts: 39
Joined: Thu Jul 03, 2008 11:31 pm

Re:validate-one-required not working for me

Postby GreyHead on Sat Jul 05, 2008 5:19 am

Hi Bullfn33,

If you want to Group radio buttons so that they 'auto-switch' then they need to all have the same name (and different values).

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3253
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:validate-one-required not working for me

Postby Bullfn33 on Sat Jul 05, 2008 7:30 pm

GreyHead wrote:Hi Bullfn33,

If you want to Group radio buttons so that they 'auto-switch' then they need to all have the same name (and different values).

Bob


Yes, they have the same name and different values but for some reason MS frontpage put them out of order but they do auto-swtich.

Is there a way to have MS Frontpage's built in validation handle the validation part because that would be easier at this point.
Bullfn33
Junior Boarder
 
Posts: 39
Joined: Thu Jul 03, 2008 11:31 pm

Re:validate-one-required not working for me

Postby GreyHead on Sat Jul 05, 2008 8:15 pm

Hi Bullfn33,

Sorry, I missed that the middle one was a text field, I think that having them out of order will break the validation too.

Sorry, I haven't used FrontPage for many years. It might work if it doesn't interfere with anything else on the page.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3253
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:validate-one-required not working for me

Postby Bullfn33 on Sun Jul 06, 2008 12:43 am

I changed the small error in the chronocontact.html.php file that someone posted a fix to in another thread and now it sends without validating anything but it did something different so maybe that's progess.

So...I've uploaded the new mooValidation.js file you gave a link to in another thread, changed the bug in the chronocontact.html.php file and added the class="validate-one-required" to the last radio button in each group between the <div></div> tags.

Is there anything else I'm missing?
Bullfn33
Junior Boarder
 
Posts: 39
Joined: Thu Jul 03, 2008 11:31 pm

Re:validate-one-required not working for me

Postby GreyHead on Sun Jul 06, 2008 5:23 am

Hi Bullfn33,

Have you fixed your form html?

Please post a link to the chronocontact.html.php fix - I'm not sure if this one helps or not.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3253
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:validate-one-required not working for me

Postby Bullfn33 on Sun Jul 06, 2008 5:58 am

Yes, I fixed the order of the name fields so all the groups are in the same order now. type, name, then value

Here is the link about the bug fix that I used.


Also, not sure if this makes a difference or not but my joomla directory is: www.mywebsite.com/joomla because this is a test site right now.
Bullfn33
Junior Boarder
 
Posts: 39
Joined: Thu Jul 03, 2008 11:31 pm

Re:validate-one-required not working for me

Postby GreyHead on Sun Jul 06, 2008 9:36 am

Hi Bullfn33,

Ok that all looks good. If it's still not working please take a form backup and post it here or email it to the address in my sig and I'll take a look.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3253
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany


Return to ChronoForms Questions & Answers

Who is online

Users browsing this forum: michaelc, Yahoo [Bot] and 2 guests