I can't see that being a problem if you are incorporating proper
serverside form validation. Serverside you should be checking all
validation rules, does it exist, is it the required datatype, the
required length...

On Fri, 4 Mar 2005 12:42:38 -0500, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> Doesn't that just cause any ugly CF error if they don't provide the
> info? (required checkbox or radio button for instance)...
> 
> This probably sounds rather silly, especially coming from a veteran
> like myself, but I've been noticing or rather more thinking about
> lately the idea of rethinking the way that I typically use <cfparam>
> for this reason alone... I've always in the past, and I think this is
> fairly common, used something like this:
> 
> <cfparam name="attributes.objectid" type="numeric" default="0">
> 
> <cfif objectid>... do stuff ...</cfif>
> 
> In my case the attributes scope is a combination of form and url
> variables... And at a first glance this looks really good because it's
> nice and validated, you know the data going in is correct. But here's
> the problem -- if a user happens to be muddling with the url and
> accidentally types a non-numeric character into that url variable,
> instead of being ignored the cfparam produces a big ugly cf-error that
> the user won't want to see... and using val() in the default attribute
> is no help of course because it's not the default value that's at
> fault. (and yea, I've made the mistake of type="numeric" default=""
> before too).
> 
> So I'm starting to think that for the base templates or otherwise
> publicly accessible templates, this structure is better:
> 
> <cfparam name="attributes.objectid" type="string" default="">
> 
> <cfif val(objectid)>... do stuff ...</cfif>
> 
> Although the code is only very subtly different, this structure will
> never produce the ugly cf error message as a result of a user
> accidentally malforming the url, because they can't possibly provide a
> value to the server in the url that CF won't interpret as a string.
> 
> I dunno... maybe I'm just tired and distracted and making a big deal
> out of nothing... anydoby else?
> 
> 
> s. isaac dealey   954.522.6080
> new epoch : isn't it time for a change?
> 
> add features without fixtures with
> the onTap open source framework
> 
> http://macromedia.breezecentral.com/p49777853/
> http://www.sys-con.com/story/?storyid=48229&DE=1
> http://www.sys-con.com/story/?storyid=44477&DE=1
> http://www.sys-con.com/story/?storyid=45569&DE=1
> http://www.sys-con.com/story/?storyid=48229&DE=1
> http://www.fusiontap.com
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197477
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to