[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] repeating form fields


> 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?

Correct.

> 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... ".

Except that my set of N widgets may include some number of "empty"
subforms, which are accepted.  Since D::FV doesn't have a
dependency_group_regexp (and indeed, I'm not really faulting it, that's
getting a bit extreme..), that is no longer easy to manage.

> The elegant long-term solution to this might be the "XForms" standard
> proposed by the W3C:

I haven't gone through that yet, but I have reached the conclusion that
I'm just running into the limits of CGI.

> 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. :)

So I've discovered, but that's a good usage too, and one that I'm sure
to run into eventually (I use D::FV as an improtant element in an Online
Survey tool we've got here.  I was most pleased to discover the hash
form of dependencies, and I'm sure at some point they'll want us to do
something that will require the features you're looking for.  If I had
sufficient tuits...sigh.

I suspect I'll just package the data-twisting I do before passing to
D::FV into a more generic form.  I'll let everyone know when I come up
with.

Thanks for the various advice.  
-- 
SwiftOne
suppressed

---------------------------------------------------------------------
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.