Skip Menu |

This queue is for tickets about the Maypole-FormBuilder CPAN distribution.

Report information
The Basics
Id: 14867
Status: new
Priority: 0/
Queue: Maypole-FormBuilder

People
Owner: Nobody in particular
Requestors: rmcclain [...] megapath.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.44
Fixed in: (no value)



Subject: field_options method?
Don't know whether to file this under QuickTable or here.. but anyway.. I have all these form_builder_defaults->{options} all over the place in my classes, but when quick_table is called, it just prints the database values. It would be kind of cool if we could specify field options in one place, and have them read by both formbuilder and quicktable. Same goes for field_labels. Thoughts?
Date: Sat, 1 Oct 2005 01:21:22 +0100
From: David Baird <dave.riverside [...] gmail.com>
To: bug-Maypole-FormBuilder [...] rt.cpan.org
Subject: Re: [cpan #14867] field_options method?
RT-Send-Cc:
On 10/1/05, Guest via RT <bug-Maypole-FormBuilder@rt.cpan.org> wrote: Show quoted text
> > This message about Maypole-FormBuilder was sent to you by guest <> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=14867 > > > Don't know whether to file this under QuickTable or here.. but anyway.. > I have all these form_builder_defaults->{options} all over the place in my classes, but when quick_table is called, it just prints the database values. It would be kind of cool if we could specify field options in one place, and have them read by both formbuilder and quicktable. Same goes for field_labels. Thoughts? >
I'll have a look at quicktable and see what I can come up with for field options. I'll have a look at getting Mp-P-FB to use column_names() to build field labels. d.
From: rmcclain [...] megapath.net
[dave.riverside@gmail.com - Fri Sep 30 20:21:47 2005]: Show quoted text
> On 10/1/05, Guest via RT <bug-Maypole-FormBuilder@rt.cpan.org> wrote:
> > > > This message about Maypole-FormBuilder was sent to you by guest <>
> via rt.cpan.org
> > > > Full context and any attached attachments can be found at: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=14867 > > > > > Don't know whether to file this under QuickTable or here.. but
> anyway..
> > I have all these form_builder_defaults->{options} all over the place
> in my classes, but when quick_table is called, it just prints the > database values. It would be kind of cool if we could specify > field options in one place, and have them read by both formbuilder > and quicktable. Same goes for field_labels. Thoughts?
> >
> > I'll have a look at quicktable and see what I can come up with for > field options. I'll have a look at getting Mp-P-FB to use > column_names() to build field labels. > > d.
For Field options, I am doing this in QuickTable.pm: my $lister = sub { my $col = shift; if($object->can('form_builder_defaults') && exists $object->form_builder_defaults->{options}->{$col} && exists return $object->form_builder_defaults->{options}->{$col}->{$object->$col}; } return '' unless @_; return @_ if @_ == 1; return join( "\n", '<ol>', ( map { "<li>$_</li>" } @_ ), '</ol>' ); }; Then, below when you call $lister, pass $_ as the first argument. The multiple "exists" are necessary to prevent auto-vivification, which seems to blow up formbuilder in some cases. That was fun to track down.