Search the web
Sign In
New User? Sign Up
qformsapi · qForms API: qForums
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Running validation at submit?   Message List  
Reply | Forward Message #3953 of 3977 |
How can I add a validation function that is not specific to one field to run when I submit the form?  I know I could do something like:

function frmSubmit { if(myFunction() == true) objForm.submit() }

But I would like the result from myFunction to be included in the alert message from qForms if something is wrong.

What I am wanting to do is verify that the user has checked at least one out of a series of 32 check boxes.  I was planning on writing a function to loop through those and return true if one was checked,but perhaps I should go another route so that it works within qForms?

--
Aaron Rouse
http://www.happyhacker.com/


Thu Oct 9, 2008 8:41 pm

aaron_rouse
Offline Offline
Send Email Send Email

Forward
Message #3953 of 3977 |
Expand Messages Author Sort by Date

How can I add a validation function that is not specific to one field to run when I submit the form? I know I could do something like: function frmSubmit {...
Aaron Rouse
aaron_rouse
Offline Send Email
Oct 9, 2008
8:41 pm

Ok, I should just type out my emails and not send them because it tends to make me find the answer. I just realized I could use validateAtLeastOne() ... -- ...
Aaron Rouse
aaron_rouse
Offline Send Email
Oct 9, 2008
8:49 pm

qForms has many great features like that. At times though, it is difficult to find them in the documentation. What I have found helpful in the past, is to look...
Dean Lawrence
deanmlaw
Offline Send Email
Oct 9, 2008
9:25 pm

It actually is not going to work 100% for my needs but I think I have figured out how I am going to do this via a custom validator just took some experimenting...
Aaron Rouse
aaron_rouse
Offline Send Email
Oct 9, 2008
11:52 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help