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 your group to be featured on the Yahoo! Groups website? 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
Messages 3918 - 3947 of 3977   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#3947 From: "d3z1gnr" <mike@...>
Date: Thu Apr 3, 2008 12:15 am
Subject: populated items not being passed on submit
d3z1gnr
Offline Offline
Send Email Send Email
 
hi guys,

i have simple form containing 2 x multiple selects -
products_available and products_selected. products_selected is
populated from a query.

problem: the products_selected select will not pass any pre-populated
items when the form is submitted. it will only work if i pass them
back to products_available and then back again??

the code i have to initialise qforms is...

<SCRIPT LANGUAGE="JavaScript">
	 <!--//
	 // initialize the qForm object
	 objForm = new qForm("related_product_form");

	 // make the User field a container, this will ensure that
the "reset()"
	 // method will restore the values in the select box, even if
they've
	 // been removed from the select box
	 objForm.products_available.makeContainer();
	 // setting the "dummyContainer" property to false will ensure
that no values
	 // from this container are included with the value
	 objForm.products_available.dummyContainer = true;

	 // make the "Members" field a container--every item in
the "Members" select box
	 // will be part of the container, even if the item isn't
selected.
	 objForm.products_selected.makeContainer();

	 stProductsSelected = new Object();
	 <cfoutput query="getRelated">
		 stProductsSelected["#getRelated.product_idfk#"]
= "#getRelated.product_title#";
	 </cfoutput>

	 objForm.products_selected.populate(stProductsSelected);
	 //-->
</SCRIPT>

#3946 From: "Troy D. Murray" <murrayt5@...>
Date: Fri Mar 21, 2008 3:25 pm
Subject: Re: Password Strength Validation?
troymurray
Offline Offline
Send Email Send Email
 
Did you ever find an answer to your question?  I'm interested in the
same thing.

#3945 From: "emadsenus" <emadsenus@...>
Date: Fri Feb 29, 2008 5:51 pm
Subject: Re: Dynamically created text fields + validateAlphaNumeric() = Out Of Memory?
emadsenus
Offline Offline
Send Email Send Email
 
The fields are actually retrieved via Ajax, rather than being created via DOM. 
I track the
fields in a Javascript Array and then loop over this array of objects during the
initialization
of my qForm object.  Everything is fine until I try to apply a validation
method.

initQForm = function(){
		 pForm = new qForm('modForm');
		 pForm.txtModuleKeyword.description = 'Module Keyword';
		 pForm.txtModuleKeyword.validateAlphaNumeric();
		 pForm.txtModuleTitle.description = 'Page Title';
		 pForm.txtTemplateAreaKeyword.description = 'Template Area';

pForm.required('fkIntPageTemplateId,txtModuleKeyword,txtModuleTitle,txtTemplateA\
reaK
eyword');
		 //loop over the page content objects retrieved via Ajax
		 for(i=0; i < pgContent.length; i++){
			 pForm[pgContent[i].contentkeyword].required = true;
			 pForm[pgContent[i].contentkeyword].description =
pgContent[i].templatekeyword + ' Content Keyword';
			 //pForm[pgContent[i].contentkeyword].validateAlphaNumeric();
			 pForm[pgContent[i].name].required = true;
			 pForm[pgContent[i].name].description = pgContent[i].templatekeyword + '
Content Name';
			 pForm[pgContent[i].content].description = pgContent[i].templatekeyword + '
Content';
		 }
	 }

#3944 From: "Dan G. Switzer, II" <dswitzer@...>
Date: Fri Feb 29, 2008 11:58 am
Subject: RE: Dynamically created text fields + validateAlphaNumeric() = Out Of Memory?
dswitzer2
Online Now Online Now
Send Email Send Email
 
>I have a rather complex form that dynamically creates a variable number of
>text fields.
>Applying a qForm object, setting description and required values for these
>fields was
>working fine until I tried to add AlphaNumeric validation.  I now get an
>infinite loop of 'Out of
>Memory' errors in Safari and Firefox crashes so hard I can't get any more
>details on the error.
>Any ideas?

What's your generated code look like (the code the browser sees?)

-Dan

#3943 From: "emadsenus" <emadsenus@...>
Date: Thu Feb 28, 2008 11:50 pm
Subject: Dynamically created text fields + validateAlphaNumeric() = Out Of Memory?
emadsenus
Offline Offline
Send Email Send Email
 
I have a rather complex form that dynamically creates a variable number of text
fields.
Applying a qForm object, setting description and required values for these
fields was
working fine until I tried to add AlphaNumeric validation.  I now get an
infinite loop of 'Out of
Memory' errors in Safari and Firefox crashes so hard I can't get any more
details on the error.
Any ideas?

#3942 From: "Tom McNeer" <tmcneer@...>
Date: Tue Feb 26, 2008 12:27 pm
Subject: Re: Don't want focus after forced validation
tmcneer
Offline Offline
Send Email Send Email
 
Hi Dan,

Thanks very much for your reply., I assumed that I'd have to modify the framework files; I just couldn't find exactly where the focus() code was. Hmmmm... I was sure I looked at the prototype checkForErrors method. Oh, well. I hate to modify core files, but in this particular case, it'll be fine. it's the behavior this client wants throughout his application.

Thanks again for your explanation.

On Mon, Feb 25, 2008 at 4:40 PM, Dan G. Switzer, II <dswitzer@...> wrote:

Tom,

There isn't a good way to alter this behavior--other than modifying the
code. In the core.validation.js there a method called:

Field.prototype.checkForErrors

You can either comment out line 286 (this.setFocus();) so that the focus
isn't reset or you can override that method with the same code minus the
this.setFocus() line.

If you go the override method, just make sure the override method is defined
after the core.validation.js file is doing.

-Dan



>-----Original Message-----
>From: qformsapi@yahoogroups.com [mailto:qformsapi@yahoogroups.com] On
>Behalf Of Tom McNeer
>Sent: Friday, February 22, 2008 5:17 PM
>To: qformsapi@yahoogroups.com
>Subject: [qformsapi] Don't want focus after forced validation
>
>This may sound a little odd, since forced validation should be just
>that. However, the behavior of qForms, when 'validate=true' is set for
>a field, is to run the validation, show an alert if the validation
>fails, and place focus back in the field being validated.
>
>Perfectly sensible. However, since this behavior keeps the user from
>moving to another field without entering a valid value, this can
>cause some frustration.
>
>My client wishes to use the validations onBlur() (as well as
>onSubmit()) since his forms have many fields with many different types
>of validations. So alerting the user to a problem onBlur is handy.
>
>However, he would still like to allow the user to go on and fill out
>other fields, find the value for the missing fields in his records
>(which may be handwritten), then add the value.
>
>Seems to me that all that needs be done is NOT to place focus back on
>the invalid field. The alert should fire onBlur and onSubmit; the
>error color should show; but refocusing should be disabled.
>
>Problem is, although this seems simple, I can't figure out where in
>the code (2.0) I could go to disable the focus event. Or is there
>actually an API method to do this?
>
>Thanks for any help.
>
>
>Tom McNeer
>
>
>
>
>
>Yahoo! Groups Links
>
>
>




--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

#3941 From: "Dan G. Switzer, II" <dswitzer@...>
Date: Mon Feb 25, 2008 9:40 pm
Subject: RE: Don't want focus after forced validation
dswitzer2
Online Now Online Now
Send Email Send Email
 
Tom,

There isn't a good way to alter this behavior--other than modifying the
code. In the core.validation.js there a method called:

Field.prototype.checkForErrors

You can either comment out line 286 (this.setFocus();) so that the focus
isn't reset or you can override that method with the same code minus the
this.setFocus() line.

If you go the override method, just make sure the override method is defined
after the core.validation.js file is doing.

-Dan

>-----Original Message-----
>From: qformsapi@yahoogroups.com [mailto:qformsapi@yahoogroups.com] On
>Behalf Of Tom McNeer
>Sent: Friday, February 22, 2008 5:17 PM
>To: qformsapi@yahoogroups.com
>Subject: [qformsapi] Don't want focus after forced validation
>
>This may sound a little odd, since forced validation should be just
>that. However, the behavior of qForms, when 'validate=true' is set for
>a field, is to run the validation, show an alert if the validation
>fails, and place focus back in the field being validated.
>
>Perfectly sensible. However, since this behavior keeps the user from
>moving to another field without entering a valid value, this can
>cause some frustration.
>
>My client wishes to use the validations onBlur() (as well as
>onSubmit()) since his forms have many fields with many different types
>of validations. So alerting the user to a problem onBlur is handy.
>
>However, he would still like to allow the user to go on and fill out
>other fields, find the value for the missing fields in his records
>(which may be handwritten), then add the value.
>
>Seems to me that all that needs be done is NOT to place focus back on
>the invalid field. The alert should fire onBlur and onSubmit; the
>error color should show; but refocusing should be disabled.
>
>Problem is, although this seems simple, I can't figure out where in
>the code (2.0) I could go to disable the focus event. Or is there
>actually an API method to do this?
>
>Thanks for any help.
>
>
>Tom McNeer
>
>
>
>
>
>Yahoo! Groups Links
>
>
>

#3940 From: "Tom McNeer" <tmcneer@...>
Date: Fri Feb 22, 2008 10:17 pm
Subject: Don't want focus after forced validation
tmcneer
Offline Offline
Send Email Send Email
 
This may sound a little odd, since forced validation should be just
that. However, the behavior of qForms, when 'validate=true' is set for
a field, is to run the validation, show an alert if the validation
fails, and place focus back in the field being validated.

Perfectly sensible. However, since this behavior keeps the user from
moving to another field without entering a valid value, this can
cause some frustration.

My client wishes to use the validations onBlur() (as well as
onSubmit()) since his forms have many fields with many different types
of validations. So alerting the user to a problem onBlur is handy.

However, he would still like to allow the user to go on and fill out
other fields, find the value for the missing fields in his records
(which may be handwritten), then add the value.

Seems to me that all that needs be done is NOT to place focus back on
the invalid field. The alert should fire onBlur and onSubmit; the
error color should show; but refocusing should be disabled.

Problem is, although this seems simple, I can't figure out where in
the code (2.0) I could go to disable the focus event. Or is there
actually an API method to do this?

Thanks for any help.


Tom McNeer

#3939 From: "adam.euans" <adam.euans@...>
Date: Thu Jan 24, 2008 12:55 pm
Subject: Re: qForms v2 removeValidation()
adam.euans
Offline Offline
Send Email Send Email
 
No, that wouldn't work for my purpose.  I needed to change the
validation to a different type (US zip code to Canadian zip code) -
the field was still required.  Since the validation per element stacks
up in a queue - I needed a way to remove one from the list.
-adam

--- In qformsapi@yahoogroups.com, Matt Williams <summitsites@...> wrote:
>
> Wouldn't this work?
> myForm.myField.setValue('');
> myForm.myField.required = false;
>
> ----- Original Message ----
> From: adam.euans <adam.euans@...>
> To: qformsapi@yahoogroups.com
> Sent: Wednesday, January 23, 2008 8:45:27 AM
> Subject: [qformsapi] qForms v2 removeValidation()
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>             I recently required the use of a removeValidation( ) on
the fly function
>
> and was unable to find something that would work - so I came up with
>
> something.
>
>
>
> file: /lib/api/core. validation. js
>
> Updated (line 115):
>
> > this.qForm.$ queue.validation [this.qForm. $queue.validatio
n.length] =
>
> new Array(this.name, fn);
>
> to:
>
> > this.qForm.$ queue.validation [this.qForm. $queue.validatio
n.length] =
>
> new Array(this.name, fn, "{0}");
>
>
>
> Added function (to bottom of file):
>
> // Field removeValidation( [validation | index]) method
>
> Field.prototype. removeValidation = function(v){
>
>      var q = this.qForm.$ queue.validation ;
>
>      if(typeof v == 'undefined') {
>
>          var _q = [];
>
>          for(i=0; i<q.length; i++) if(q[i][0]!= this.name)
_q.push(q[i] );
>
>          this.qForm.$ queue.validation =_q;
>
>      }else if(/\d/.test( v)){
>
>          var c = 0;
>
>          for(i=0; i<q.length; i++) if(q[i][0]== this.name) { if(c==v)
>
> q.splice(i, 1); c++; }
>
>      }else{
>
>          for(i=0; i<q.length; i++) if(q[i][0]== this.name && new
>
> RegExp("^(is| validate) ?"+q[i][2] +"$",'i') .test(v)) { q.splice(i,
1); }
>
>      }
>
> };
>
>
>
> I also noticed an update required to removeField( ) that was needed to
>
> remove a field from the qForm object.
>
>
>
> File:  /qform.js
>
> replaced the current qForm.prototype. removeField method with:
>
>
>
> // qForm removeField( sFieldName) method
>
> qForm.prototype. removeField = function (n){
>
>      // this function requires a JS1.2 browser
>
>
>
> // currently, events attached to a form field are not
>
>      // deleted. this means you'll need to manually remove
>
>      // the field from the DOM, or errors will occur
>
>      var r = this.onRemoveField( n);
>
>      if( !r ) return r;
>
>      if( _t(this[n], "undefined") ) return false;
>
>
>
> // remove validation on fields
>
>      this.$queue. validation= [];
>
>      this.$pointers[ n.toLowerCase( )].removeValidat ion();
>
>
>
> delete this[n];
>
>      delete this.$pointers[ n.toLowerCase( )];
>
>      var f = this._fields;
>
>      // find the field in the fields array and remove it
>
>      for( var i=0; i < f.length; i++ ){
>
>          if( f[i] == n ){
>
>              f.splice(i,1) ;
>
>              break;
>
>          }
>
>      }
>
>
>
> return true;
>
> };
>
>
>
> Anyway, this was something that I needed, and thought someone else might
>
> find useful.
>
> -adam
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> <!--
>
> #ygrp-mkp{
> border:1px solid #d8d8d8;font-family:Arial;margin:14px
0px;padding:0px 14px;}
> #ygrp-mkp hr{
> border:1px solid #d8d8d8;}
> #ygrp-mkp #hd{
>
color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px
0px;}
> #ygrp-mkp #ads{
> margin-bottom:10px;}
> #ygrp-mkp .ad{
> padding:0 0;}
> #ygrp-mkp .ad a{
> color:#0000ff;text-decoration:none;}
> -->
>
>
>
> <!--
>
> #ygrp-sponsor #ygrp-lc{
> font-family:Arial;}
> #ygrp-sponsor #ygrp-lc #hd{
> margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
> #ygrp-sponsor #ygrp-lc .ad{
> margin-bottom:10px;padding:0 0;}
> -->
>
>
>
> <!--
>
> #ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean,
sans-serif;}
> #ygrp-mlmsg table {font-size:inherit;font:100%;}
> #ygrp-mlmsg select, input, textarea {font:99% arial, helvetica,
clean, sans-serif;}
> #ygrp-mlmsg pre, code {font:115% monospace;}
> #ygrp-mlmsg * {line-height:1.22em;}
> #ygrp-text{
> font-family:Georgia;
> }
> #ygrp-text p{
> margin:0 0 1em 0;}
> #ygrp-tpmsgs{
> font-family:Arial;
> clear:both;}
> #ygrp-vitnav{
> padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
> #ygrp-vitnav a{
> padding:0 1px;}
> #ygrp-actbar{
> clear:both;margin:25px
0;white-space:nowrap;color:#666;text-align:right;}
> #ygrp-actbar .left{
> float:left;white-space:nowrap;}
> .bld{font-weight:bold;}
> #ygrp-grft{
> font-family:Verdana;font-size:77%;padding:15px 0;}
> #ygrp-ft{
> font-family:verdana;font-size:77%;border-top:1px solid #666;
> padding:5px 0;
> }
> #ygrp-mlmsg #logo{
> padding-bottom:10px;}
>
> #ygrp-vital{
> background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
> #ygrp-vital #vithd{
>
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:upp\
ercase;}
> #ygrp-vital ul{
> padding:0;margin:2px 0;}
> #ygrp-vital ul li{
> list-style-type:none;clear:both;border:1px solid #e0ecee;
> }
> #ygrp-vital ul li .ct{
>
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-ri\
ght:.5em;}
> #ygrp-vital ul li .cat{
> font-weight:bold;}
> #ygrp-vital a{
> text-decoration:none;}
>
> #ygrp-vital a:hover{
> text-decoration:underline;}
>
> #ygrp-sponsor #hd{
> color:#999;font-size:77%;}
> #ygrp-sponsor #ov{
> padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
> #ygrp-sponsor #ov ul{
> padding:0 0 0 8px;margin:0;}
> #ygrp-sponsor #ov li{
> list-style-type:square;padding:6px 0;font-size:77%;}
> #ygrp-sponsor #ov li a{
> text-decoration:none;font-size:130%;}
> #ygrp-sponsor #nc{
> background-color:#eee;margin-bottom:20px;padding:0 8px;}
> #ygrp-sponsor .ad{
> padding:8px 0;}
> #ygrp-sponsor .ad #hd1{
>
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%\
;}
> #ygrp-sponsor .ad a{
> text-decoration:none;}
> #ygrp-sponsor .ad a:hover{
> text-decoration:underline;}
> #ygrp-sponsor .ad p{
> margin:0;}
> o{font-size:0;}
> .MsoNormal{
> margin:0 0 0 0;}
> #ygrp-text tt{
> font-size:120%;}
> blockquote{margin:0 0 0 4px;}
> .replbq{margin:4;}
> -->
>
>
>
>
>
>
>
>
>
________________________________________________________________________________\
____
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>

#3938 From: Matt Williams <summitsites@...>
Date: Wed Jan 23, 2008 4:57 pm
Subject: Re: qForms v2 removeValidation()
summitsites
Offline Offline
Send Email Send Email
 
Wouldn't this work?
myForm.myField.setValue('');
myForm.myField.required = false;

----- Original Message ----
From: adam.euans <adam.euans@...>
To: qformsapi@yahoogroups.com
Sent: Wednesday, January 23, 2008 8:45:27 AM
Subject: [qformsapi] qForms v2 removeValidation()

I recently required the use of a removeValidation( ) on the fly function
and was unable to find something that would work - so I came up with
something.

file: /lib/api/core. validation. js
Updated (line 115):
> this.qForm.$ queue.validation [this.qForm. $queue.validatio n.length] =
new Array(this.name, fn);
to:
> this.qForm.$ queue.validation [this.qForm. $queue.validatio n.length] =
new Array(this.name, fn, "{0}");

Added function (to bottom of file):
// Field removeValidation( [validation | index]) method
Field.prototype. removeValidation = function(v){
var q = this.qForm.$ queue.validation ;
if(typeof v == 'undefined') {
var _q = [];
for(i=0; i<q.length; i++) if(q[i][0]!= this.name) _q.push(q[i] );
this.qForm.$ queue.validation =_q;
}else if(/\d/.test( v)){
var c = 0;
for(i=0; i<q.length; i++) if(q[i][0]== this.name) { if(c==v)
q.splice(i, 1); c++; }
}else{
for(i=0; i<q.length; i++) if(q[i][0]== this.name && new
RegExp("^(is| validate) ?"+q[i][2] +"$",'i') .test(v)) { q.splice(i, 1); }
}
};

I also noticed an update required to removeField( ) that was needed to
remove a field from the qForm object.

File: /qform.js
replaced the current qForm.prototype. removeField method with:

// qForm removeField( sFieldName) method
qForm.prototype. removeField = function (n){
// this function requires a JS1.2 browser

// currently, events attached to a form field are not
// deleted. this means you'll need to manually remove
// the field from the DOM, or errors will occur
var r = this.onRemoveField( n);
if( !r ) return r;
if( _t(this[n], "undefined") ) return false;

// remove validation on fields
this.$queue. validation= [];
this.$pointers[ n.toLowerCase( )].removeValidat ion();

delete this[n];
delete this.$pointers[ n.toLowerCase( )];
var f = this._fields;
// find the field in the fields array and remove it
for( var i=0; i < f.length; i++ ){
if( f[i] == n ){
f.splice(i,1) ;
break;
}
}

return true;
};

Anyway, this was something that I needed, and thought someone else might
find useful.
-adam




Looking for last minute shopping deals? Find them fast with Yahoo! Search.

#3937 From: "adam.euans" <adam.euans@...>
Date: Wed Jan 23, 2008 2:45 pm
Subject: qForms v2 removeValidation()
adam.euans
Offline Offline
Send Email Send Email
 
I recently required the use of a removeValidation() on the fly function
and was unable to find something that would work - so I came up with
something.

file: /lib/api/core.validation.js
Updated (line 115):
> this.qForm.$queue.validation[this.qForm.$queue.validation.length] =
new Array(this.name, fn);
to:
> this.qForm.$queue.validation[this.qForm.$queue.validation.length] =
new Array(this.name, fn, "{0}");

Added function (to bottom of file):
// Field removeValidation([validation | index]) method
Field.prototype.removeValidation = function(v){
      var q = this.qForm.$queue.validation;
      if(typeof v == 'undefined'){
          var _q = [];
          for(i=0; i<q.length; i++) if(q[i][0]!=this.name) _q.push(q[i]);
          this.qForm.$queue.validation=_q;
      }else if(/\d/.test(v)){
          var c = 0;
          for(i=0; i<q.length; i++) if(q[i][0]==this.name){ if(c==v)
q.splice(i, 1); c++; }
      }else{
          for(i=0; i<q.length; i++) if(q[i][0]==this.name && new
RegExp("^(is|validate)?"+q[i][2]+"$",'i').test(v)){ q.splice(i, 1); }
      }
};

I also noticed an update required to removeField() that was needed to
remove a field from the qForm object.

File:  /qform.js
replaced the current qForm.prototype.removeField method with:

// qForm removeField(sFieldName) method
qForm.prototype.removeField = function (n){
      // this function requires a JS1.2 browser

      // currently, events attached to a form field are not
      // deleted. this means you'll need to manually remove
      // the field from the DOM, or errors will occur
      var r = this.onRemoveField(n);
      if( !r ) return r;
      if( _t(this[n], "undefined") ) return false;

      // remove validation on fields
      this.$queue.validation=[];
      this.$pointers[n.toLowerCase()].removeValidation();

      delete this[n];
      delete this.$pointers[n.toLowerCase()];
      var f = this._fields;
      // find the field in the fields array and remove it
      for( var i=0; i < f.length; i++ ){
          if( f[i] == n ){
              f.splice(i,1);
              break;
          }
      }

      return true;
};

Anyway, this was something that I needed, and thought someone else might
find useful.
-adam

#3936 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Jan 16, 2008 8:26 pm
Subject: Re: Trigger Validation
aaron_rouse
Offline Offline
Send Email Send Email
 
Nevermind :)  I see now I can check _queue.errors.length to see if it is greater than 0.

On Jan 16, 2008 2:15 PM, Aaron Rouse <aaron.rouse@... > wrote:
Dan,

Guess one thing I should have asked before I go digging too far, after I run the validate() is there something I can check to see that the validate() prompted the user with an alert?


On Jan 16, 2008 2:10 PM, Aaron Rouse <aaron.rouse@...> wrote:
Dan,

Thanks, I just read it now in the docs and was about to reply to here with a "nevermind"

Aaron


On Jan 16, 2008 2:07 PM, Dan G. Switzer, II < dswitzer@...> wrote:

Use the validate() method.

 

-Dan

 


From: qformsapi@yahoogroups.com [mailto:qformsapi@yahoogroups.com] On Behalf Of Aaron Rouse
Sent: Wednesday, January 16, 2008 2:59 PM
To: qformsapi@yahoogroups.com
Subject: [qformsapi] Trigger Validation

 

Is there a way to trigger the validation on a form without submitting it?  I want to validate information before inserting it into a hidden table for later use.




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



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



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

#3935 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Jan 16, 2008 8:15 pm
Subject: Re: Trigger Validation
aaron_rouse
Offline Offline
Send Email Send Email
 
Dan,

Guess one thing I should have asked before I go digging too far, after I run the validate() is there something I can check to see that the validate() prompted the user with an alert?

On Jan 16, 2008 2:10 PM, Aaron Rouse <aaron.rouse@...> wrote:
Dan,

Thanks, I just read it now in the docs and was about to reply to here with a "nevermind"

Aaron


On Jan 16, 2008 2:07 PM, Dan G. Switzer, II < dswitzer@...> wrote:

Use the validate() method.

 

-Dan

 


From: qformsapi@yahoogroups.com [mailto:qformsapi@yahoogroups.com] On Behalf Of Aaron Rouse
Sent: Wednesday, January 16, 2008 2:59 PM
To: qformsapi@yahoogroups.com
Subject: [qformsapi] Trigger Validation

 

Is there a way to trigger the validation on a form without submitting it?  I want to validate information before inserting it into a hidden table for later use.




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



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

#3934 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Jan 16, 2008 8:10 pm
Subject: Re: Trigger Validation
aaron_rouse
Offline Offline
Send Email Send Email
 
Dan,

Thanks, I just read it now in the docs and was about to reply to here with a "nevermind"

Aaron

On Jan 16, 2008 2:07 PM, Dan G. Switzer, II < dswitzer@...> wrote:

Use the validate() method.

 

-Dan

 


From: qformsapi@yahoogroups.com [mailto:qformsapi@yahoogroups.com] On Behalf Of Aaron Rouse
Sent: Wednesday, January 16, 2008 2:59 PM
To: qformsapi@yahoogroups.com
Subject: [qformsapi] Trigger Validation

 

Is there a way to trigger the validation on a form without submitting it?  I want to validate information before inserting it into a hidden table for later use.




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

#3933 From: "Dan G. Switzer, II" <dswitzer@...>
Date: Wed Jan 16, 2008 8:07 pm
Subject: RE: Trigger Validation
dswitzer2
Online Now Online Now
Send Email Send Email
 

Use the validate() method.

 

-Dan

 


From: qformsapi@yahoogroups.com [mailto:qformsapi@yahoogroups.com] On Behalf Of Aaron Rouse
Sent: Wednesday, January 16, 2008 2:59 PM
To: qformsapi@yahoogroups.com
Subject: [qformsapi] Trigger Validation

 

Is there a way to trigger the validation on a form without submitting it?  I want to validate information before inserting it into a hidden table for later use.


#3932 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Jan 16, 2008 7:59 pm
Subject: Trigger Validation
aaron_rouse
Offline Offline
Send Email Send Email
 
Is there a way to trigger the validation on a form without submitting it?  I want to validate information before inserting it into a hidden table for later use.

#3931 From: "Fred T. Sanders" <fred@...>
Date: Sun Jan 6, 2008 4:02 pm
Subject: Re: Re: confused on dependencies
sandersfred
Offline Offline
Send Email Send Email
 
1 is the same as "True" in javascript. So it sounds like its working as it
should if not as you expected.

Fred T. Sanders

----- Original Message -----
From: "less_than_kind" <hkinash@...>
To: <qformsapi@yahoogroups.com>
Sent: Thursday, January 03, 2008 1:45 PM
Subject: [qformsapi] Re: confused on dependencies


> It seems to be creating the dependency regardless of the value of
> needEmail - I can check the value using getValue() and it says the
> value is 1, but it is returning true on createDependencyTo, and then
> executing validateEmail().
>
> --- In qformsapi@yahoogroups.com, Edward A Savage Jr <sonnysavage@...>
> wrote:
>>
>>
>> Based on the documentation
>
(http://www.pengoworks.com/qforms/docs/extension_fields.htm#createDependencyTo)
> I'd have to disagree with Dean.
>>
>> The JavaScript should look something like this:
>>
>> objForm.emailAddress.createDependencyTo("FaxMe",
> "objForm.needEmail.getValue() = '0'");
>> Edward "Sonny" Savage
>> http://savagefamily.pbwiki.com/
>>
>>
>> ----- Original Message ----
>> From: Dean Lawrence <deanlaw@...>
>> To: qformsapi@yahoogroups.com
>> Sent: Wednesday, January 2, 2008 2:43:21 PM
>> Subject: Re: [qformsapi] confused on dependencies
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>             The createDependencyTo would not work in this situation
> since
>>
>> selecting either of the Yes/No needEmail radio buttons would cause the
>>
>> emailAddress field to be required. What you could do is to make the
>>
>> submit button a type="button" instead of type="submit" and then attach
>>
>> an event to the onclick which evaluates the needEmail value and then
>>
>> either sets or unsets (is that a word?) the required value of the
>>
>> emailAddress field and then submits the form. It would look something
>>
>> like this.
>>
>>
>>
>> objForm.btnSubmit. addEvent( "onclick" , "checkemail( );", false);
>>
>>
>>
>> function checkemail() {
>>
>> var requireEmail= objForm.emailAdd ress.getValue( );
>>
>> if (requireEmail) {
>>
>> objForm.emailAddres s.required = true;
>>
>> objForm.submit( );
>>
>> return true ;
>>
>> }else {
>>
>> objForm.emailAddres s.required = false;
>>
>> return false ;
>>
>> }
>>
>> }
>>
>>
>>
>> Hope this helps,
>>
>>
>>
>> Dean
>>
>>
>>
>> On Jan 2, 2008 11:46 AM, less_than_kind <hkinash@sasktel. net> wrote:
>>
>> > Right now what I'm trying to accomplish is to only validate a certain
>>
>> > field - let's call it emailAddress - if a certain radio button is
>>
>> > selected.  Let's call the radio buttons needEmail, and there are two -
>>
>> > one with a value of 1, and another with a value of 0.  I only want the
>>
>> > field emailAddress validated if needEmail = 0.
>>
>> >
>>
>> > I don't know if using createDependencyTo would work even if it played
>>
>> > nice with the radio buttons - I haven't found an example that shows
>>
>> > what I'm trying to do.  If emailAddress was set to not required, but
>>
>> > validateEmail( ) was still used on it, wouldn't it throw an error?
>>
>> >
>>
>> > Thanks for any help.  :)
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> > Yahoo! Groups Links
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>>
>>
>> --
>>
>> ____________ _________ _________ _________ ___
>>
>> Dean Lawrence, CIO/Partner
>>
>> Internet Data Technology
>>
>> 888.GET.IDT1 ext. 701 * fax: 888.438.4381
>>
>> http://www.idatatec h.com/
>>
>> Corporate Internet Development and Marketing Specialists
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> <!--
>>
>>
>>
>> #ygrp-mkp{
>> border:1px solid #d8d8d8;font-family:Arial;margin:14px
> 0px;padding:0px 14px;}
>> #ygrp-mkp hr{
>> border:1px solid #d8d8d8;}
>> #ygrp-mkp #hd{
>>
> color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px
> 0px;}
>> #ygrp-mkp #ads{
>> margin-bottom:10px;}
>> #ygrp-mkp .ad{
>> padding:0 0;}
>> #ygrp-mkp .ad a{
>> color:#0000ff;text-decoration:none;}
>> -->
>>
>>
>>
>> <!--
>>
>>
>>
>> #ygrp-sponsor #ygrp-lc{
>> font-family:Arial;}
>> #ygrp-sponsor #ygrp-lc #hd{
>> margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
>> #ygrp-sponsor #ygrp-lc .ad{
>> margin-bottom:10px;padding:0 0;}
>> -->
>>
>>
>>
>> <!--
>>
>>
>>
>> #ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean,
> sans-serif;}
>> #ygrp-mlmsg table {font-size:inherit;font:100%;}
>> #ygrp-mlmsg select, input, textarea {font:99% arial, helvetica,
> clean, sans-serif;}
>> #ygrp-mlmsg pre, code {font:115% monospace;}
>> #ygrp-mlmsg * {line-height:1.22em;}
>> #ygrp-text{
>> font-family:Georgia;}
>> #ygrp-text p{
>> margin:0 0 1em 0;}
>> #ygrp-tpmsgs{
>> font-family:Arial;clear:both;}
>> #ygrp-vitnav{
>> padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
>> #ygrp-vitnav a{
>> padding:0 1px;}
>> #ygrp-actbar{
>> clear:both;margin:25px
> 0;white-space:nowrap;color:#666;text-align:right;}
>> #ygrp-actbar .left{
>> float:left;white-space:nowrap;}
>> .bld{font-weight:bold;}
>> #ygrp-grft{
>> font-family:Verdana;font-size:77%;padding:15px 0;}
>> #ygrp-ft{
>> font-family:verdana;font-size:77%;border-top:1px solid
> #666;padding:5px 0;}
>> #ygrp-mlmsg #logo{
>> padding-bottom:10px;}
>>
>> #ygrp-vital{
>> background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
>> #ygrp-vital #vithd{
>>
>
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:upp\
ercase;}
>> #ygrp-vital ul{
>> padding:0;margin:2px 0;}
>> #ygrp-vital ul li{
>> list-style-type:none;clear:both;border:1px solid #e0ecee;}
>> #ygrp-vital ul li .ct{
>>
>
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-ri\
ght:.5em;}
>> #ygrp-vital ul li .cat{
>> font-weight:bold;}
>> #ygrp-vital a{
>> text-decoration:none;}
>>
>> #ygrp-vital a:hover{
>> text-decoration:underline;}
>>
>> #ygrp-sponsor #hd{
>> color:#999;font-size:77%;}
>> #ygrp-sponsor #ov{
>> padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
>> #ygrp-sponsor #ov ul{
>> padding:0 0 0 8px;margin:0;}
>> #ygrp-sponsor #ov li{
>> list-style-type:square;padding:6px 0;font-size:77%;}
>> #ygrp-sponsor #ov li a{
>> text-decoration:none;font-size:130%;}
>> #ygrp-sponsor #nc{
>> background-color:#eee;margin-bottom:20px;padding:0 8px;}
>> #ygrp-sponsor .ad{
>> padding:8px 0;}
>> #ygrp-sponsor .ad #hd1{
>>
>
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%\
;}
>> #ygrp-sponsor .ad a{
>> text-decoration:none;}
>> #ygrp-sponsor .ad a:hover{
>> text-decoration:underline;}
>> #ygrp-sponsor .ad p{
>> margin:0;}
>> o{font-size:0;}
>> .MsoNormal{
>> margin:0 0 0 0;}
>> #ygrp-text tt{
>> font-size:120%;}
>> blockquote{margin:0 0 0 4px;}
>> .replbq{margin:4;}
>> -->
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
________________________________________________________________________________\
____
>> Be a better friend, newshound, and
>> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>

#3930 From: "less_than_kind" <hkinash@...>
Date: Thu Jan 3, 2008 7:45 pm
Subject: Re: confused on dependencies
less_than_kind
Offline Offline
Send Email Send Email
 
It seems to be creating the dependency regardless of the value of
needEmail - I can check the value using getValue() and it says the
value is 1, but it is returning true on createDependencyTo, and then
executing validateEmail().

--- In qformsapi@yahoogroups.com, Edward A Savage Jr <sonnysavage@...>
wrote:
>
>
> Based on the documentation
(http://www.pengoworks.com/qforms/docs/extension_fields.htm#createDependencyTo)
I'd have to disagree with Dean.
>
> The JavaScript should look something like this:
>
> 	 objForm.emailAddress.createDependencyTo("FaxMe",
"objForm.needEmail.getValue() = '0'");
> Edward "Sonny" Savage
> http://savagefamily.pbwiki.com/
>
>
> ----- Original Message ----
> From: Dean Lawrence <deanlaw@...>
> To: qformsapi@yahoogroups.com
> Sent: Wednesday, January 2, 2008 2:43:21 PM
> Subject: Re: [qformsapi] confused on dependencies
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>             The createDependencyTo would not work in this situation
since
>
> selecting either of the Yes/No needEmail radio buttons would cause the
>
> emailAddress field to be required. What you could do is to make the
>
> submit button a type="button" instead of type="submit" and then attach
>
> an event to the onclick which evaluates the needEmail value and then
>
> either sets or unsets (is that a word?) the required value of the
>
> emailAddress field and then submits the form. It would look something
>
> like this.
>
>
>
> objForm.btnSubmit. addEvent( "onclick" , "checkemail( );", false);
>
>
>
> function checkemail() {
>
>  var requireEmail= objForm.emailAdd ress.getValue( );
>
>  if (requireEmail) {
>
> 	 objForm.emailAddres s.required = true;
>
> 	 objForm.submit( );
>
> 	 return true ;
>
>  }else {
>
> 	 objForm.emailAddres s.required = false;
>
> 	 return false ;
>
>  }
>
> }
>
>
>
> Hope this helps,
>
>
>
> Dean
>
>
>
> On Jan 2, 2008 11:46 AM, less_than_kind <hkinash@sasktel. net> wrote:
>
> > Right now what I'm trying to accomplish is to only validate a certain
>
> > field - let's call it emailAddress - if a certain radio button is
>
> > selected.  Let's call the radio buttons needEmail, and there are two -
>
> > one with a value of 1, and another with a value of 0.  I only want the
>
> > field emailAddress validated if needEmail = 0.
>
> >
>
> > I don't know if using createDependencyTo would work even if it played
>
> > nice with the radio buttons - I haven't found an example that shows
>
> > what I'm trying to do.  If emailAddress was set to not required, but
>
> > validateEmail( ) was still used on it, wouldn't it throw an error?
>
> >
>
> > Thanks for any help.  :)
>
> >
>
> >
>
> >
>
> >
>
> > Yahoo! Groups Links
>
> >
>
> >
>
> >
>
> >
>
>
>
> --
>
> ____________ _________ _________ _________ ___
>
> Dean Lawrence, CIO/Partner
>
> Internet Data Technology
>
> 888.GET.IDT1 ext. 701 * fax: 888.438.4381
>
> http://www.idatatec h.com/
>
> Corporate Internet Development and Marketing Specialists
>
>
>
>
>
>
>
>
>
>
>
>
> <!--
>
>
>
> #ygrp-mkp{
> border:1px solid #d8d8d8;font-family:Arial;margin:14px
0px;padding:0px 14px;}
> #ygrp-mkp hr{
> border:1px solid #d8d8d8;}
> #ygrp-mkp #hd{
>
color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px
0px;}
> #ygrp-mkp #ads{
> margin-bottom:10px;}
> #ygrp-mkp .ad{
> padding:0 0;}
> #ygrp-mkp .ad a{
> color:#0000ff;text-decoration:none;}
> -->
>
>
>
> <!--
>
>
>
> #ygrp-sponsor #ygrp-lc{
> font-family:Arial;}
> #ygrp-sponsor #ygrp-lc #hd{
> margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
> #ygrp-sponsor #ygrp-lc .ad{
> margin-bottom:10px;padding:0 0;}
> -->
>
>
>
> <!--
>
>
>
> #ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean,
sans-serif;}
> #ygrp-mlmsg table {font-size:inherit;font:100%;}
> #ygrp-mlmsg select, input, textarea {font:99% arial, helvetica,
clean, sans-serif;}
> #ygrp-mlmsg pre, code {font:115% monospace;}
> #ygrp-mlmsg * {line-height:1.22em;}
> #ygrp-text{
> font-family:Georgia;}
> #ygrp-text p{
> margin:0 0 1em 0;}
> #ygrp-tpmsgs{
> font-family:Arial;clear:both;}
> #ygrp-vitnav{
> padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
> #ygrp-vitnav a{
> padding:0 1px;}
> #ygrp-actbar{
> clear:both;margin:25px
0;white-space:nowrap;color:#666;text-align:right;}
> #ygrp-actbar .left{
> float:left;white-space:nowrap;}
> .bld{font-weight:bold;}
> #ygrp-grft{
> font-family:Verdana;font-size:77%;padding:15px 0;}
> #ygrp-ft{
> font-family:verdana;font-size:77%;border-top:1px solid
#666;padding:5px 0;}
> #ygrp-mlmsg #logo{
> padding-bottom:10px;}
>
> #ygrp-vital{
> background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
> #ygrp-vital #vithd{
>
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:upp\
ercase;}
> #ygrp-vital ul{
> padding:0;margin:2px 0;}
> #ygrp-vital ul li{
> list-style-type:none;clear:both;border:1px solid #e0ecee;}
> #ygrp-vital ul li .ct{
>
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-ri\
ght:.5em;}
> #ygrp-vital ul li .cat{
> font-weight:bold;}
> #ygrp-vital a{
> text-decoration:none;}
>
> #ygrp-vital a:hover{
> text-decoration:underline;}
>
> #ygrp-sponsor #hd{
> color:#999;font-size:77%;}
> #ygrp-sponsor #ov{
> padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
> #ygrp-sponsor #ov ul{
> padding:0 0 0 8px;margin:0;}
> #ygrp-sponsor #ov li{
> list-style-type:square;padding:6px 0;font-size:77%;}
> #ygrp-sponsor #ov li a{
> text-decoration:none;font-size:130%;}
> #ygrp-sponsor #nc{
> background-color:#eee;margin-bottom:20px;padding:0 8px;}
> #ygrp-sponsor .ad{
> padding:8px 0;}
> #ygrp-sponsor .ad #hd1{
>
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%\
;}
> #ygrp-sponsor .ad a{
> text-decoration:none;}
> #ygrp-sponsor .ad a:hover{
> text-decoration:underline;}
> #ygrp-sponsor .ad p{
> margin:0;}
> o{font-size:0;}
> .MsoNormal{
> margin:0 0 0 0;}
> #ygrp-text tt{
> font-size:120%;}
> blockquote{margin:0 0 0 4px;}
> .replbq{margin:4;}
> -->
>
>
>
>
>
>
>
>
>
>
________________________________________________________________________________\
____
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>

#3929 From: "Dean Lawrence" <deanlaw@...>
Date: Thu Jan 3, 2008 3:48 am
Subject: Re: confused on dependencies
deanmlaw
Offline Offline
Send Email Send Email
 
Edward,

You are indeed correct. That's what I get for trying to go off memory.
Thanks for setting it straight. 8-)

Dean

On Jan 2, 2008 8:03 PM, Edward A Savage Jr <sonnysavage@...> wrote:
>
> Based on the documentation
>
(http://www.pengoworks.com/qforms/docs/extension_fields.htm#createDependencyTo)
> I'd have to disagree with Dean.
>
> The JavaScript should look something like this:
>     objForm.emailAddress.createDependencyTo("FaxMe",
> "objForm.needEmail.getValue() = '0'");
>  Edward "Sonny" Savage
> http://savagefamily.pbwiki.com/
>
>
>
> ----- Original Message ----
> From: Dean Lawrence <deanlaw@...>
> To: qformsapi@yahoogroups.com
> Sent: Wednesday, January 2, 2008 2:43:21 PM
> Subject: Re: [qformsapi] confused on dependencies
>
>
>
> The createDependencyTo would not work in this situation since
> selecting either of the Yes/No needEmail radio buttons would cause the
> emailAddress field to be required. What you could do is to make the
> submit button a type="button" instead of type="submit" and then attach
> an event to the onclick which evaluates the needEmail value and then
> either sets or unsets (is that a word?) the required value of the
> emailAddress field and then submits the form. It would look something
> like this.
>
> objForm.btnSubmit. addEvent( "onclick" , "checkemail( );", false);
>
> function checkemail() {
> var requireEmail= objForm.emailAdd ress.getValue( );
> if (requireEmail) {
> objForm.emailAddres s.required = true;
>
> objForm.submit( );
> return true ;
> }else {
> objForm.emailAddres s.required = false;
>
> return false ;
> }
> }
>
> Hope this helps,
>
> Dean
>
> On Jan 2, 2008 11:46 AM, less_than_kind <hkinash@sasktel. net> wrote:
> > Right now what I'm trying to accomplish is to only validate a certain
> > field - let's call it emailAddress - if a certain radio button is
> > selected. Let's call the radio buttons needEmail, and there are two -
> > one with a value of 1, and another with a value of 0. I only want the
> > field emailAddress validated if needEmail = 0.
> >
> > I don't know if using createDependencyTo would work even if it played
> > nice with the radio buttons - I haven't found an example that shows
> > what I'm trying to do. If emailAddress was set to not required, but
> > validateEmail( ) was still used on it, wouldn't it throw an error?
> >
> > Thanks for any help. :)
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>
> --
> ____________ _________ _________ _________ ___
>
> Dean Lawrence, CIO/Partner
> Internet Data Technology
> 888.GET.IDT1 ext. 701 * fax: 888.438.4381
> http://www.idatatec h.com/
>
> Corporate Internet Development and Marketing Specialists
>
>
>
>
>
> ________________________________
> Never miss a thing. Make Yahoo your homepage.



--
__________________________________________
Dean Lawrence, CIO/Partner
Internet Data Technology
888.GET.IDT1 ext. 701 * fax: 888.438.4381
http://www.idatatech.com/
Corporate Internet Development and Marketing Specialists

#3928 From: Edward A Savage Jr <sonnysavage@...>
Date: Thu Jan 3, 2008 1:03 am
Subject: Re: confused on dependencies
sonnysavage
Offline Offline
Send Email Send Email
 
Based on the documentation (http://www.pengoworks.com/qforms/docs/extension_fields.htm#createDependencyTo) I'd have to disagree with Dean.

The JavaScript should look something like this:
    objForm.emailAddress.createDependencyTo("FaxMe", "objForm.needEmail.getValue() = '0'");
 
Edward "Sonny" Savage
http://savagefamily.pbwiki.com/


----- Original Message ----
From: Dean Lawrence <deanlaw@...>
To: qformsapi@yahoogroups.com
Sent: Wednesday, January 2, 2008 2:43:21 PM
Subject: Re: [qformsapi] confused on dependencies

The createDependencyTo would not work in this situation since
selecting either of the Yes/No needEmail radio buttons would cause the
emailAddress field to be required. What you could do is to make the
submit button a type="button" instead of type="submit" and then attach
an event to the onclick which evaluates the needEmail value and then
either sets or unsets (is that a word?) the required value of the
emailAddress field and then submits the form. It would look something
like this.

objForm.btnSubmit. addEvent( "onclick" , "checkemail( );", false);

function checkemail() {
var requireEmail= objForm.emailAdd ress.getValue( );
if (requireEmail) {
objForm.emailAddres s.required = true;
objForm.submit( );
return true ;
}else {
objForm.emailAddres s.required = false;
return false ;
}
}

Hope this helps,

Dean

On Jan 2, 2008 11:46 AM, less_than_kind <hkinash@sasktel. net> wrote:
> Right now what I'm trying to accomplish is to only validate a certain
> field - let's call it emailAddress - if a certain radio button is
> selected. Let's call the radio buttons needEmail, and there are two -
> one with a value of 1, and another with a value of 0. I only want the
> field emailAddress validated if needEmail = 0.
>
> I don't know if using createDependencyTo would work even if it played
> nice with the radio buttons - I haven't found an example that shows
> what I'm trying to do. If emailAddress was set to not required, but
> validateEmail( ) was still used on it, wouldn't it throw an error?
>
> Thanks for any help. :)
>
>
>
>
> Yahoo! Groups Links
>
>
>
>

--
____________ _________ _________ _________ ___
Dean Lawrence, CIO/Partner
Internet Data Technology
888.GET.IDT1 ext. 701 * fax: 888.438.4381
http://www.idatatec h.com/
Corporate Internet Development and Marketing Specialists




Never miss a thing. Make Yahoo your homepage.

#3927 From: "Paul Ihrig" <pihrig@...>
Date: Thu Jan 3, 2008 12:45 am
Subject: jquery calculations plugin
paul_ihrig
Offline Offline
Send Email Send Email
 
hey dan
was curious if you could use the calculation.plugin to do a sum of the results of a table colum?
http://www.pengoworks.com/workshop/jquery/calculation.plugin.htm

colum1    colum2
12           2
10           1
20           4


sumcolum1 = 42
sumcolum1 = 7
sumcolum1/sumcolum2=6

i have some pretty twisted cfloops going on to do count on records.
but trying to sum every thing in a sub set column i am running into some walls.

thanks
-paul

#3926 From: "Dean Lawrence" <deanlaw@...>
Date: Wed Jan 2, 2008 7:43 pm
Subject: Re: confused on dependencies
deanmlaw
Offline Offline
Send Email Send Email
 
The createDependencyTo would not work in this situation since
selecting either of the Yes/No needEmail radio buttons would cause the
emailAddress field to be required. What you could do is to make the
submit button a type="button" instead of type="submit" and then attach
an event to the onclick which evaluates the needEmail value and then
either sets or unsets (is that a word?) the required value of the
emailAddress field and then submits the form. It would look something
like this.

objForm.btnSubmit.addEvent("onclick", "checkemail();", false);

function checkemail() {
	 var requireEmail=objForm.emailAddress.getValue();
	 if (requireEmail){
		 objForm.emailAddress.required = true;
		 objForm.submit();
		 return true ;
	 }else {
		 objForm.emailAddress.required = false;
		 return false ;
	 }
}


Hope this helps,

Dean


On Jan 2, 2008 11:46 AM, less_than_kind <hkinash@...> wrote:
> Right now what I'm trying to accomplish is to only validate a certain
> field - let's call it emailAddress - if a certain radio button is
> selected.  Let's call the radio buttons needEmail, and there are two -
> one with a value of 1, and another with a value of 0.  I only want the
> field emailAddress validated if needEmail = 0.
>
> I don't know if using createDependencyTo would work even if it played
> nice with the radio buttons - I haven't found an example that shows
> what I'm trying to do.  If emailAddress was set to not required, but
> validateEmail() was still used on it, wouldn't it throw an error?
>
> Thanks for any help.  :)
>
>
>
>
> Yahoo! Groups Links
>
>
>
>



--
__________________________________________
Dean Lawrence, CIO/Partner
Internet Data Technology
888.GET.IDT1 ext. 701 * fax: 888.438.4381
http://www.idatatech.com/
Corporate Internet Development and Marketing Specialists

#3925 From: Craig Arnett <craigarnett@...>
Date: Wed Jan 2, 2008 6:05 pm
Subject: Re: confused on dependencies
craigarnett
Offline Offline
Send Email Send Email
 
According to what I've experienced the validateEmail() should only throw an error if there was a value entered and it is not a valid email address.  Making it required forces you to place a value in the field.  The follow up or secondary action would be the validation of the email address.
 
The create dependency function allows you to tie two fields together.  Once the the first field is acted upon then the other field becomes required..
 
Hope this helps.
 
Sincerely,
 
Craig

----- Original Message ----
From: less_than_kind <hkinash@...>
To: qformsapi@yahoogroups.com
Sent: Wednesday, January 2, 2008 8:46:56 AM
Subject: [qformsapi] confused on dependencies

Right now what I'm trying to accomplish is to only validate a certain
field - let's call it emailAddress - if a certain radio button is
selected. Let's call the radio buttons needEmail, and there are two -
one with a value of 1, and another with a value of 0. I only want the
field emailAddress validated if needEmail = 0.

I don't know if using createDependencyTo would work even if it played
nice with the radio buttons - I haven't found an example that shows
what I'm trying to do. If emailAddress was set to not required, but
validateEmail( ) was still used on it, wouldn't it throw an error?

Thanks for any help. :)




Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

#3924 From: "less_than_kind" <hkinash@...>
Date: Wed Jan 2, 2008 4:46 pm
Subject: confused on dependencies
less_than_kind
Offline Offline
Send Email Send Email
 
Right now what I'm trying to accomplish is to only validate a certain
field - let's call it emailAddress - if a certain radio button is
selected.  Let's call the radio buttons needEmail, and there are two -
one with a value of 1, and another with a value of 0.  I only want the
field emailAddress validated if needEmail = 0.

I don't know if using createDependencyTo would work even if it played
nice with the radio buttons - I haven't found an example that shows
what I'm trying to do.  If emailAddress was set to not required, but
validateEmail() was still used on it, wouldn't it throw an error?

Thanks for any help.  :)

#3923 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Dec 5, 2007 11:11 pm
Subject: Re: Validate dynamically added fields
aaron_rouse
Offline Offline
Send Email Send Email
 
doh! ... thanks, will give it a try once I get to creating the page

On Dec 5, 2007 3:35 PM, Matt Williams <summitsites@...> wrote:

Use addField()

oForm.addField('newFieldName');
oForm.newFieldName.required = true;


----- Original Message ----
From: Aaron Rouse < aaron.rouse@...>
To: qformsapi@yahoogroups.com
Sent: Wednesday, December 5, 2007 3:31:08 PM
Subject: [qformsapi] Validate dynamically added fields

I am going to need to have a page that will allow the user to add rows for input.  Each row will have the same form fields but their names will increment by one so they have unique names.  I'd like to use qForms to validate some of the information in those and was curious if there is a way to I guess inject the new validation rules(what is created, descriptions, dependencies, etc) or if I have to re-initialize qForms each time a row is added or I suppose maybe I could initialize qForms only once a user has clicked on a button to submit the form?

--
Aaron Rouse
http://www.happyhac ker.com/




Looking for last minute shopping deals? Find them fast with Yahoo! Search.




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

#3922 From: Matt Williams <summitsites@...>
Date: Wed Dec 5, 2007 9:35 pm
Subject: Re: Validate dynamically added fields
summitsites
Offline Offline
Send Email Send Email
 
Use addField()

oForm.addField('newFieldName');
oForm.newFieldName.required = true;

----- Original Message ----
From: Aaron Rouse <aaron.rouse@...>
To: qformsapi@yahoogroups.com
Sent: Wednesday, December 5, 2007 3:31:08 PM
Subject: [qformsapi] Validate dynamically added fields

I am going to need to have a page that will allow the user to add rows for input.  Each row will have the same form fields but their names will increment by one so they have unique names.  I'd like to use qForms to validate some of the information in those and was curious if there is a way to I guess inject the new validation rules(what is created, descriptions, dependencies, etc) or if I have to re-initialize qForms each time a row is added or I suppose maybe I could initialize qForms only once a user has clicked on a button to submit the form?

--
Aaron Rouse
http://www.happyhac ker.com/




Looking for last minute shopping deals? Find them fast with Yahoo! Search.

#3921 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Dec 5, 2007 9:31 pm
Subject: Validate dynamically added fields
aaron_rouse
Offline Offline
Send Email Send Email
 
I am going to need to have a page that will allow the user to add rows for input.  Each row will have the same form fields but their names will increment by one so they have unique names.  I'd like to use qForms to validate some of the information in those and was curious if there is a way to I guess inject the new validation rules(what is created, descriptions, dependencies, etc) or if I have to re-initialize qForms each time a row is added or I suppose maybe I could initialize qForms only once a user has clicked on a button to submit the form?

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

#3920 From: "adam.euans" <adam.euans@...>
Date: Tue Nov 6, 2007 5:16 pm
Subject: Possible qForms v2 Validation Bug
adam.euans
Offline Offline
Send Email Send Email
 
The _sic() function of the Function library has a bug in the "numeric"
case.  I believe the RegExp("\\d+", "gi") should be RegExp("[^0-9]+",
"gi") because it is supposed to remove the non-numeric characters –
not the numeric ones.  I hope this helps.
-adam

#3919 From: "Tom McNeer" <tmcneer@...>
Date: Mon Nov 12, 2007 2:05 pm
Subject: Re: Multiple forms
tmcneer
Offline Offline
Send Email Send Email
 
Hi Dan,

Thanks for stepping in. Yes, I'm aware of the serialize method, and
since I'm using CF on the back end, reading the WDDX string is simple
enough.

However, in this particular case, I have a very long form on multiple
tabs which, after much travail, was finally finished, including all
the server-side routines, with the form fields flowing into a
Model-Glue event, then into Transfer objects.

Then a change was made, which essentially requires that I place an
AJAX form/routine in the middle of my main form, requiring that I
split the main form. Rather than rewriting the server-side routines,
too -- which wouldn't be that hard, certainly -- I chose to keep the
fields as individual values in the request's normal form scope.

But that's simple enough -- when form 2 is submitted, I just grab the
handy qForms object for form 1, go over the array and create hidden
fields as children of form 2. As I said earlier, I just thought there
might be a built-in way in qForms to do this. I fully understand why
the serialize method is better in most cases.

Thanks again for your help, and for a great tool.



--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

#3918 From: "Dan G. Switzer, II" <dswitzer@...>
Date: Sun Nov 11, 2007 10:59 pm
Subject: RE: Multiple forms
dswitzer2
Online Now Online Now
Send Email Send Email
 
Tom,

>I had a feeling that's what I was going to hear. I know you can't
>submit both forms. Basically, I was hoping that since the qFormsAPI
>object already contained all the name/value pairs, there might be a
>built-in function in qForms to do the looping and create the hidden
>fields, as you suggest.
>
>Certainly the WDDX structure gives you everything in one place. But
>qForms has so many ways of accessing and using its objects, I thought
>that perhaps the step of outputting the value pairs from the qFormsAPI
>object might already be built -- although I couldn't find it.

In the qforms folder, there's a wddx.js library file. Just include this in
your qFormsAPI.include() calls. You can then do qFormsAPI.serialize() to
serialize all the forms into a WDDX structure--which you can then pass in a
hidden field.

The serialize() method takes a list of field to exclude, and you will want
to exclude the field you plan on storing the WDDX results in.

-Dan

Messages 3918 - 3947 of 3977   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

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