Re: Adding & Updating empty values

2008-10-29 Thread Claude Schneegans
>>here is a good method Well, actually not so good: if a checkbox is not checked, its name will not appear in form.fieldnames, so the loop on fieldnames will work only on defined fileds and the http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-

Re: Adding & Updating empty values

2008-10-29 Thread Claude Schneegans
>>I agree, but I still have to enter all the form field names in the anyways so I'm not really gaining anything. I have solved this problem once for all this way : 1. in your form page, add this JS function call onsubmit, ie: var defaultList = ""; function checkInput(formul) { if(!formul

RE: Adding & Updating empty values

2008-10-28 Thread Rick Sanders
Ah! Thank you! I've been looking for resources like this! Excellent! Thank you! -Original Message- From: Gerald Guido [mailto:[EMAIL PROTECTED] Sent: October-28-08 6:27 PM To: cf-talk Subject: Re: Adding & Updating empty values Rick, It may be time to make yourself acquainted

Re: Adding & Updating empty values

2008-10-28 Thread Gerald Guido
I forgot squidhead http://squidhead.riaforge.org/ On Tue, Oct 28, 2008 at 5:27 PM, Gerald Guido <[EMAIL PROTECTED]>wrote: > Rick, > It may be time to make yourself acquainted with the wonderful world of code > generators. Here is a partial list of the various offerings. I make heavy > use of cfc

Re: Adding & Updating empty values

2008-10-28 Thread Gerald Guido
uestionnaire form with 50 questions! You mean I have to do a > for every question and assign it a blank value if there's no value!? > > -Original Message- > From: Rob Parkhill [mailto:[EMAIL PROTECTED] > Sent: October-28-08 4:42 PM > To: cf-talk > Subject: Re:

Re: Adding & Updating empty values

2008-10-28 Thread Jason Fisher
Be sure that one of the radio options is checked by default. Yes That way you should never get an empty radio, but the user still has to choose "yes" where appropriate. >Yup, you're right. > >It's the radio buttons that are giving me the hassle! > >text fields are defined even if they are em

Re: Adding & Updating empty values

2008-10-28 Thread Donnie Snyder
here is a good method to add defaults for a form to the page you are posting to. NOTE: remember to remove the (name="submit") from your submit button. This way it will not be included in the form.fieldnames list. Another bug I have found is you cant name the form fields numeric as in For s

Re: Adding & Updating empty values

2008-10-28 Thread Judah McAuley
On Tue, Oct 28, 2008 at 1:36 PM, Rick Sanders <[EMAIL PROTECTED]> wrote: > I agree, but I still have to enter all the form field names in the > anyways so I'm not really gaining anything. Coding templates are your friend. But regardless, I offered a suggestion to solve this earlier in a message

Re: Adding & Updating empty values

2008-10-28 Thread Charlie Griefer
> -Original Message- > From: Ben Forta [mailto:[EMAIL PROTECTED] > Sent: October-28-08 5:32 PM > To: cf-talk > Subject: RE: Adding & Updating empty values > > >> How do I get passed the "q1 is not defined in Form" CF error? All I want > to > &

RE: Adding & Updating empty values

2008-10-28 Thread Rick Sanders
I agree, but I still have to enter all the form field names in the anyways so I'm not really gaining anything. -Original Message- From: Ben Forta [mailto:[EMAIL PROTECTED] Sent: October-28-08 5:32 PM To: cf-talk Subject: RE: Adding & Updating empty values >> How do I get

RE: Adding & Updating empty values

2008-10-28 Thread Ben Forta
code. That's what is for, all form fields should be defined (default them to "" if needed) higher up, along with form field validation, and so on. --- Ben -Original Message- From: Gerald Guido [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 28, 2008 4:10 PM To: cf-talk

RE: Adding & Updating empty values

2008-10-28 Thread Rick Sanders
Yup, you're right. It's the radio buttons that are giving me the hassle! -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: October-28-08 5:14 PM To: cf-talk Subject: Re: Adding & Updating empty values text fields are defined even if they are empty.

Re: Adding & Updating empty values

2008-10-28 Thread Rob Parkhill
AIL PROTECTED]> wrote: > I hear you, and already did that for checkboxes. But, I have text fields > and > radio buttons in my form! > > > -Original Message- > From: Jason Fisher [mailto:[EMAIL PROTECTED] > Sent: October-28-08 4:47 PM > To: cf-talk > Subject: Re: Ad

Re: Adding & Updating empty values

2008-10-28 Thread Charlie Griefer
t; -Original Message- > From: Jason Fisher [mailto:[EMAIL PROTECTED] > Sent: October-28-08 4:47 PM > To: cf-talk > Subject: Re: Adding & Updating empty values > > The other option is to use "yes" and "no" radio buttons instead of > checkboxes, w

Re: Adding & Updating empty values

2008-10-28 Thread Judah McAuley
<[EMAIL PROTECTED]> wrote: > I hear you, and already did that for checkboxes. But, I have text fields and > radio buttons in my form! > > > -Original Message- > From: Jason Fisher [mailto:[EMAIL PROTECTED] > Sent: October-28-08 4:47 PM > To: cf-talk > Subject: R

Re: Adding & Updating empty values

2008-10-28 Thread Jason Fisher
Well, then isDefined("form.q1") or structKeyExists(form, "q1") should both be true, whether or not q1 is blank. If you're getting the not defined error for a text input, then something else is going on ... is there a redirect or a layer of translation between the post and the processing or some

Re: Adding & Updating empty values

2008-10-28 Thread Gerald Guido
Is that the only way? > > It's a questionnaire form with 50 questions! You mean I have to do a > for every question and assign it a blank value if there's no value!? > > -Original Message- > From: Rob Parkhill [mailto:[EMAIL PROTECTED] > Sent: October-28-08 4

RE: Adding & Updating empty values

2008-10-28 Thread Rick Sanders
I hear you, and already did that for checkboxes. But, I have text fields and radio buttons in my form! -Original Message- From: Jason Fisher [mailto:[EMAIL PROTECTED] Sent: October-28-08 4:47 PM To: cf-talk Subject: Re: Adding & Updating empty values The other option is to use

Re: Adding & Updating empty values

2008-10-28 Thread Rob Parkhill
question and assign it a blank value if there's no value!? > > -Original Message- > From: Rob Parkhill [mailto:[EMAIL PROTECTED] > Sent: October-28-08 4:42 PM > To: cf-talk > Subject: Re: Adding & Updating empty values > > wrap it in a so.. > >

Re: Adding & Updating empty values

2008-10-28 Thread Jason Fisher
The other option is to use "yes" and "no" radio buttons instead of checkboxes, where the radio buttons default to "no". That way, the field always exists, but you still get the difference between 1 and 0. Checkbox that is unchecked really doesn't exist in the POST, so the CFIF solution is pret

RE: Adding & Updating empty values

2008-10-28 Thread Rick Sanders
Re: Adding & Updating empty values wrap it in a so.. Rob On Tue, Oct 28, 2008 at 3:33 PM, Rick Sanders <[EMAIL PROTECTED]> wrote: > Hey all, > > > > In my form some values may be left empty. For example a form field named > q1. > > It's fine if

Re: Adding & Updating empty values

2008-10-28 Thread Rob Parkhill
wrap it in a so.. Rob On Tue, Oct 28, 2008 at 3:33 PM, Rick Sanders <[EMAIL PROTECTED]> wrote: > Hey all, > > > > In my form some values may be left empty. For example a form field named > q1. > > It's fine if it's empty because the user can go back and fill it in later > if > the

Adding & Updating empty values

2008-10-28 Thread Rick Sanders
Hey all, In my form some values may be left empty. For example a form field named q1. It's fine if it's empty because the user can go back and fill it in later if they wish. How do I get passed the "q1 is not defined in Form" CF error? All I want to do is enter an empty value. How can I al