I'll jump in, too. 1) Break the form apart into multiple pages. Having 200 ?'s to fill out at once is daunting. It could be all on the same template and use a switch block on a url querystring variable to determine what section to display and validate. This has the added effect of making any alert box not so dang big. :) That being said, I wouldn't use an alert box:
2) For each section, set up a list or array of required form field names in your CF (or whatever platform you're using) code. Your server validation goes through this list and makes sure there are variables in the FORM structure that match these keys and contain values. At this point, it's trivial to have separate lists for additional validation, say one for numbers, dates, etc. Note that you only need to mention any field once in any of these lists. If everything passes validation, display the next section. If not, display the previous section and pass which fields didn't pass validation. Your display logic can test this and apply a style to bad elements that will highlight them. Just my $.03. I'm sure there are frameworks that do this already. Chris On Mon, Jan 26, 2009 at 4:37 PM, Ajas Mohammed <[email protected]> wrote: > One way, would be to add textbox1_required hidden form element for the > matching element named textbox1 in your form. > > This way, CF automatically displays a page saying textbox1 is required and > user can use back button to enter information for that field. > > Other way, would be on form processing page, you could have a validation > routine, which shows which fields were not entered by user. > > Algorithm would be : > > <cfif not len(textbox1)> > <cfset errorMsg = "textbox1 is required"> > </cfif> > > You can go on appending other element names to this string and display > later. > > HTH > > > <Ajas Mohammed /> > http://ajashadi.blogspot.com > We cannot become what we need to be, remaining what we are. > No matter what, find a way. Because thats what winners do. > You can't improve what you don't measure. > Quality is never an accident; it is always the result of high intention, > sincere effort, intelligent direction and skillful execution; it represents > the wise choice of many alternatives. > > > On Mon, Jan 26, 2009 at 5:27 PM, Ecung II,Ramon J > <[email protected]>wrote: > >> Hey, I've got a quick question. I have a form with about 200 questions >> on it with all of the questions being required. >> >> >> >> Right now if a user doesn't input any data and just hits submit, an alert >> box pops up that is too large for the screen. Does anyone have any ideas >> about how make this more user-friendly? >> >> >> >> Ramon Ecung, BS, ACHDS, MCP >> >> Support Services Analyst - Web Application Developer >> >> Division of Cancer Medicine - FC10.2005 >> >> 713-794-4273 | [email protected] | Unit 421 >> >> >> >> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Houston ColdFusion Users' Group" discussion list. To unsubscribe, send email to [email protected] For more options, visit http://groups.google.com/group/houcfug?hl=en -~----------~----~----~----~------~----~------~--~---
