Oops, Forgot the trim for the annoying user who submits some spaces.  I
usually code <cfif len(trim(form.pic))>

--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 3:56 PM
To: CF-Talk
Subject: RE: blank flie field ~again~


Actually you could shorten your If statement to <cfif len(form.pic)>  You
don't need the pounds, doing a Boolean is supposed to be faster then a
comparison [form.pic NEQ ""], and unless you really care about form.submit
for some other reason, you don't need it at all.

--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


-----Original Message-----
From: Dave Lyons [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 3:24 PM
To: CF-Talk
Subject: Re: blank flie field ~again~


actually i may have gotten it
the problem is in this:

<!--- do the file upload now --->
 <cfif isdefined("form.submit")>
 <cffile Action="upload"
  Filefield="pic"
  DESTINATION="C:\Inetpub\wwwroot\rma\uploads\"
  Nameconflict="makeunique" accept="image/*">
 </cfif>

But I think if i change it to:
<!--- do the file upload now --->
 <cfif isdefined("form.submit") AND #form.pic# NEQ "">
 <cffile Action="upload"
  Filefield="pic"
  DESTINATION="C:\Inetpub\wwwroot\rma\uploads\"
  Nameconflict="makeunique" accept="image/*">
 </cfif>

seems logical after I pulled my head outta my ass!

btw charlie, thanks for your article on easycfm.com on query params:)
I cant believe what a difference that makes!

thats one thing I have scene that is lacking in all these books, that they
barely touch it. They should just throw it in from the start.

dave








----- Original Message -----
From: "Charlie Griefer" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, June 02, 2003 6:08 PM
Subject: Re: blank flie field ~again~


> No inputs (that I am aware of) are, by their nature, required.
>
> Any chance you can post a URL that we can see?  I'd like to view the
source,
> as well as see exactly what the error msg says.
>
> charlie
>
> ----- Original Message -----
> From: "Dave Lyons" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, June 02, 2003 2:35 PM
> Subject: Re: blank flie field ~again~
>
>
> > nope
> > straight up no nothing, just wont process without it
> > dave
> > ----- Original Message -----
> > From: "Charlie Griefer" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Monday, June 02, 2003 5:25 PM
> > Subject: Re: blank flie field ~again~
> >
> >
> > > Are you making them required either thru js or some sort of cfform
> > > attribute?
> > >
> > > charlie
> > >
> > > ----- Original Message -----
> > > From: "Dave Lyons" <[EMAIL PROTECTED]>
> > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > Sent: Monday, June 02, 2003 1:39 PM
> > > Subject: blank flie field ~again~
> > >
> > >
> > > > I know i asked this before but i never really got an answer that
> worked
> > > >
> > > > ? is say i have 5 file fields to upload on a form but the user only
> uses
> > > say 3 of them, if you leave any blank it defaults to an error that
says
> > that
> > > the file fields are required. It seems to do this before getting to
the
> > > process page where you could get by it.
> > > > Does anyone have any ideas of ways around this short of having to do
> > them
> > > 1 at a time?
> > > >
> > > > Thanks
> > > > dave
> > > >
> > > >
> > > >
> > >
> >
> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to