Re: qForms Question

2008-03-06 Thread C. Hatton Humphrey
  I know I can do this in Javascript but I'm hesitant to roll my own
  when qForms is already validating the rest of the form (some 15 other
  required fields).  Is there a way to do this in qForms?

  This should do what you want:
  http://www.pengoworks.com/qforms/ext/atLeastOne.htm

  You can use it like:

  oForm.textareaName.validateAtLeastOne(checkboxName);

  That should enforce that at least the textarea is filled in or one of the
  checkboxes is checked.

I tried this and it does not seem to be working.  I'm not getting any
errors on the JS Error console so I know it's *working*.

I have all of the formfields created, here is the JS call for qForms:

script type=text/javascript
objForm = new qForm(catrequest);

objForm.catalogtype.description =  catalog type;
objForm.fldComments.description =  general comment;
objForm.catalogtype.validateAtLeastOne(fldComments);

objForm.required(txtFirstName,txtLastName,txtCompany,txtEmail,txtAddress,txtCity,txtState,txtZip,txtCountry,txtPhone);
objForm.txtFirstName.description =  First Name;
objForm.txtLastName.description =  Last Name;
objForm.txtCompany.description =  Company Name;
objForm.txtEmail.description =  email address;
objForm.txtAddress.description =  mailing address;
objForm.txtCity.description =  City;
objForm.txtState.description =  State (or Province);
objForm.txtZip.description =  Zip or Postal Code;
objForm.txtCountry.description =  country;
objForm.txtPhone.description =  phone number;

objForm.txtFirstName.focus();
/script

Do I need to make any changes to the Form code itself?

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300646
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qForms Question

2008-03-06 Thread Dan G. Switzer, II
  I know I can do this in Javascript but I'm hesitant to roll my own
  when qForms is already validating the rest of the form (some 15 other
  required fields).  Is there a way to do this in qForms?

  This should do what you want:
  http://www.pengoworks.com/qforms/ext/atLeastOne.htm

  You can use it like:

  oForm.textareaName.validateAtLeastOne(checkboxName);

  That should enforce that at least the textarea is filled in or one of
the
  checkboxes is checked.

I tried this and it does not seem to be working.  I'm not getting any
errors on the JS Error console so I know it's *working*.

I have all of the formfields created, here is the JS call for qForms:

script type=text/javascript
objForm = new qForm(catrequest);

objForm.catalogtype.description =  catalog type;
objForm.fldComments.description =  general comment;
objForm.catalogtype.validateAtLeastOne(fldComments);

objForm.required(txtFirstName,txtLastName,txtCompany,txtEmail,txtAddress,t
xtCity,txtState,txtZip,txtCountry,txtPhone);
objForm.txtFirstName.description =  First Name;
objForm.txtLastName.description =  Last Name;
objForm.txtCompany.description =  Company Name;
objForm.txtEmail.description =  email address;
objForm.txtAddress.description =  mailing address;
objForm.txtCity.description =  City;
objForm.txtState.description =  State (or Province);
objForm.txtZip.description =  Zip or Postal Code;
objForm.txtCountry.description =  country;
objForm.txtPhone.description =  phone number;

objForm.txtFirstName.focus();
/script

Do I need to make any changes to the Form code itself?


Are you loading the validateAtLeastOne() function?

Also, make sure that the textarea doesn't contain any whitespacing. If you
wrote your textarea tags as:

textarea
/textarea

Then you're tag has whitespace, which would cause the validation rule to be
skipped (since it contains a value.)

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300653
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: qForms Question

2008-03-06 Thread C. Hatton Humphrey
Okay, made some changes to the qForms call -

script type=text/javascript

objForm = new qForm(catrequest);

// set the path to the qForms directory
objForm.setLibraryPath(/includes/qforms/lib/qforms/);
// this loads all the default libraries
objForm.include(*);

objForm.catalogtype.description =  catalog type;
objForm.fldComments.description =  general comment;
objForm.catalogtype.validateAtLeastOne(fldComments);

objForm.required(txtFirstName,txtLastName,txtCompany,txtEmail,txtAddress,txtCity,txtState,txtZip,txtCountry,txtPhone);
objForm.txtFirstName.description =  First Name;
objForm.txtLastName.description =  Last Name;
objForm.txtCompany.description =  Company Name;
objForm.txtEmail.description =  email address;
objForm.txtAddress.description =  mailing address;
objForm.txtCity.description =  City;
objForm.txtState.description =  State (or Province);
objForm.txtZip.description =  Zip or Postal Code;
objForm.txtCountry.description =  country;
objForm.txtPhone.description =  phone number;


objForm.txtFirstName.focus();
/script

Now in the JS Error console I get: objForm.setLibraryPath is not a function

??

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300658
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: qForms Question

2008-03-06 Thread Dan G. Switzer, II
It should be:

// set the path to the qForms directory
qFormAPI.setLibraryPath(/includes/qforms/lib/qforms/);
// this loads all the default libraries
qFormAPI.include(*);

You've also got to include the function that on in the page on:
http://www.pengoworks.com/qforms/ext/atLeastOne.htm

-Dan



-Original Message-
From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2008 2:28 PM
To: CF-Talk
Subject: Re: qForms Question

Okay, made some changes to the qForms call -

script type=text/javascript

objForm = new qForm(catrequest);

// set the path to the qForms directory
objForm.setLibraryPath(/includes/qforms/lib/qforms/);
// this loads all the default libraries
objForm.include(*);

objForm.catalogtype.description =  catalog type;
objForm.fldComments.description =  general comment;
objForm.catalogtype.validateAtLeastOne(fldComments);

objForm.required(txtFirstName,txtLastName,txtCompany,txtEmail,txtAddress,t
xtCity,txtState,txtZip,txtCountry,txtPhone);
objForm.txtFirstName.description =  First Name;
objForm.txtLastName.description =  Last Name;
objForm.txtCompany.description =  Company Name;
objForm.txtEmail.description =  email address;
objForm.txtAddress.description =  mailing address;
objForm.txtCity.description =  City;
objForm.txtState.description =  State (or Province);
objForm.txtZip.description =  Zip or Postal Code;
objForm.txtCountry.description =  country;
objForm.txtPhone.description =  phone number;


objForm.txtFirstName.focus();
/script

Now in the JS Error console I get: objForm.setLibraryPath is not a
function

??



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300680
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: qForms Question

2008-03-06 Thread C. Hatton Humphrey
  You've also got to include the function that on in the page on:

 http://www.pengoworks.com/qforms/ext/atLeastOne.htm

That code exists in /includes/qforms/lib/qforms/validation_addon.js
 that's why I thought forcing the include would work.

(*scritch*)

Hatton

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300682
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qForms Question

2008-03-06 Thread Dan G. Switzer, II
  You've also got to include the function that on in the page on:

 http://www.pengoworks.com/qforms/ext/atLeastOne.htm

That code exists in /includes/qforms/lib/qforms/validation_addon.js
 that's why I thought forcing the include would work.

(*scritch*)

The qFormAPI.include(*) only loads the all the core files. You'll have
to manually load the validation_addon.js library.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300684
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


qForms Question

2008-03-05 Thread C. Hatton Humphrey
I've inherited  a form that is using qForms for validation.  The
form includes a series of three checkboxes, all with the same name but
different values,  further down there is a textarea.  The client has
asked for a validation rule that requires either one of the checkboxes
to be checked, the textarea to contain a value or both.  If the user
does not check a box or enter something in the texarea, a validation
message needs to appear.

I know I can do this in Javascript but I'm hesitant to roll my own
when qForms is already validating the rest of the form (some 15 other
required fields).  Is there a way to do this in qForms?

Thanks!
Hatton

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300515
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: qForms Question

2008-03-05 Thread Tom McNeer

 Is there a way to do this in qForms?


The short answer is yes. Here are the qForms docs:
http://www.pengoworks.com/qforms/docs/.

If you're still stuck, there's a qForms forum/list, which the author often
answers.

If you still want to roll your own, just add an onsubmit statement to your
form for return myNewFunc(). It will fire along with the normal qForms
validations. But qForms has ways to create pretty much whatever you need.

-- 
Thanks,

Tom

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


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300517
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qForms Question

2008-03-05 Thread Dan G. Switzer, II
Hatton,

I've inherited  a form that is using qForms for validation.  The
form includes a series of three checkboxes, all with the same name but
different values,  further down there is a textarea.  The client has
asked for a validation rule that requires either one of the checkboxes
to be checked, the textarea to contain a value or both.  If the user
does not check a box or enter something in the texarea, a validation
message needs to appear.

I know I can do this in Javascript but I'm hesitant to roll my own
when qForms is already validating the rest of the form (some 15 other
required fields).  Is there a way to do this in qForms?

This should do what you want:
http://www.pengoworks.com/qforms/ext/atLeastOne.htm

You can use it like:

oForm.textareaName.validateAtLeastOne(checkboxName);

That should enforce that at least the textarea is filled in or one of the
checkboxes is checked.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300547
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: qForms Question

2008-03-05 Thread Tom McNeer
Dan,

oForm.textareaName.validateAtLeastOne(checkboxName);


That is extremely cool. I've been using qForms for a long time, but I didn't
realize you could relate validations across elements that way. Thanks for
the tip.

-- 
Thanks,

Tom

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


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300550
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qForms Question

2008-03-05 Thread Dan G. Switzer, II
Tom,

oForm.textareaName.validateAtLeastOne(checkboxName);


That is extremely cool. I've been using qForms for a long time, but I
didn't
realize you could relate validations across elements that way. Thanks for
the tip.

It's not a perfect solution--since you need to attach the validation to one
of the fields, but that custom method will do the trick for those validate
either a or b type of situations.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300552
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: qForms Question

2008-03-05 Thread Tom McNeer
Dan,


 It's not a perfect solution--since you need to attach the validation to
 one
 of the fields, but that custom method will do the trick for those validate
 either a or b type of situations.


Seems pretty good to me. So -- the method you specified will validate that
EITHER  one of the checkboxes is checked OR there is content in the
textarea?

That's the sort of thing where I always added a custom validator or at least
used an Expression. Are there other examples on your site, or elsewhere,
that go into this sort of validation of related fields? I must have missed
them.




-- 
Thanks,

Tom

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


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300564
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: qForms Question

2008-03-05 Thread C. Hatton Humphrey
BTW - Thanks for the quick answers!

Hatton

On Wed, Mar 5, 2008 at 3:21 PM, Tom McNeer [EMAIL PROTECTED] wrote:
 Dan,



   It's not a perfect solution--since you need to attach the validation to
   one
   of the fields, but that custom method will do the trick for those validate
   either a or b type of situations.


  Seems pretty good to me. So -- the method you specified will validate that
  EITHER  one of the checkboxes is checked OR there is content in the
  textarea?

  That's the sort of thing where I always added a custom validator or at least
  used an Expression. Are there other examples on your site, or elsewhere,
  that go into this sort of validation of related fields? I must have missed
  them.





  --
  Thanks,

  Tom

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


  

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300567
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: qForms Question

2008-03-05 Thread Dan G. Switzer, II
Tom,

 It's not a perfect solution--since you need to attach the validation to
 one
 of the fields, but that custom method will do the trick for those
validate
 either a or b type of situations.


Seems pretty good to me. So -- the method you specified will validate that
EITHER  one of the checkboxes is checked OR there is content in the
textarea?

Correct. In a nutshell it's Make sure at least one of these fields has a
value.

That's the sort of thing where I always added a custom validator or at
least
used an Expression. Are there other examples on your site, or elsewhere,
that go into this sort of validation of related fields? I must have missed
them.

Someone paid me to write that extension, but I had the stipulation that I be
allowed to post it on my website. It's the only extension that's not in
the download.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300572
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


OT: QForms Question..

2004-07-30 Thread Tangorre, Michael
Anyone here using qforms?
Anyone see anything wrong with this?
I keep getting an object expected error.. g

 
form
input type=Button name=btnDeletePoc value=Delete POC
class=submit-button /
/form

 
objForm2.btnAddPoc.addEvent(onClick,spawnWindow('http://www.google.com');
);
objForm2.btnDeletePoc.addEvent(onClick,myTestFunction(); return true;);

 
function myTestFunction(){
 alert('test');
return true;
}

 
The funny thing is, the add button that fires off spawnWindow works fine...
but the myTestFucntion will not work. It has to be something blatantly
obvious!LOL

 
Anyone?

 
Thanks

 
Mike
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]