On Thu, 6 Feb 2003, Brett Sanger wrote: > > What hacking is required with Data::FormValidator. You can specify a > > regexp to define your form fields. > > But it is not required that all the sets be filled in -- the hacking > isn't with D::FV, it's with the data passed to it and the input profile. > > If I'm displaying 3 subforms, I have to break that data up into three > chunks and evalute each subform separately, then look at those results > and make a decision. D::FV wants to evaluate the form as a whole, so I > either break up my data, or I create a monstrous input profile. > > I know this sounds unnecessarily complex, but it's come up for 3 > different projects already, so I was eager to see if anyone else had > solved the problem. Is the problem is that you are doing something like editting N widgets on the same screen where each widget has the same set of form elements associated with it? If that's the case, I handle it by adding a unique prefix or suffix to the names of the elements in each "sub-form". Data::FormValidator already handles this well in that you define required fields, optional fields and constraints with a regular expressions, so it's easy to apply logic for "all fields whose name begins with... ". The elegant long-term solution to this might be the "XForms" standard proposed by the W3C: http://www.w3.org/MarkUp/Forms/ Which allows you submit complex data structures (I think) instead of the simple name/value pairs of the CGI protocol. My proposal to extend D::FV has a slightly different focus: handling a group checkboxes with all the same name, or a selection list with multiple values, not necessarily multiple groups of checkboxs. :) Mark -- . . . . . . . . . . . . . . . . . . . . . . . . . . . Mark Stosberg Principal Developer suppressed Summersault, LLC 765-939-9301 ext 202 database driven websites . . . . . http://www.summersault.com/ . . . . . . . . --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/suppressed/ To unsubscribe, e-mail: suppressed For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.