[html-formfu] Select elements inside Repeatables

Greg Coates greg at coatesoft.com
Wed May 13 15:55:16 GMT 2009


Updating to HTML-FormFu-Model-DBIC 0.04003 fixed this problem.  However, 
that introduced a new issue.

I'm using some custom, calculated fields in my DBIx::Class setup. 
Here's the relevant part of the schema definition:

package Coatesoft::PBP::Schema::DB::Contacts;

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components("Core");
__PACKAGE__->table("contacts");
__PACKAGE__->add_columns(
   "ctc_id",
   {
     data_type => "bigint",
     default_value => "nextval('contacts_ctc_id_seq'::regclass)",
     is_nullable => 0,
     size => 8,
   },

   [ ... SNIP ... ]

sub ctc_common_name {
   my $self = shift;

   if ($self->ctc_is_company()) {
     return $self->ctc_last_name();
   } else {
     return $self->ctc_first_name() . " " . $self->ctc_last_name();
   }
}


I'm using the custom column in the form like so:

elements:
   - type: Select
     name: ivc_vendor
     label: Vendor
     model_config:
       resultset: Contacts
       id_column: ctc_id
       label_column: ctc_common_name


Before, this worked fine.  Now I get this error:
BIx::Class::Row::get_column(): No such column 'ctc_common_name' at 
/usr/lib/perl5/site_perl/5.8.5/HTML/FormFu/Model/DBIC.pm line 110


Greg

Carl Franks wrote:
> 2009/5/12 Greg Coates <greg at coatesoft.com>:
>> It looks like this has been undone in the new release from CPAN (0.04002).
>>  I updated, and all of the data in my 'selects' disappeared.
> 
> Have you also updated to the latest CPAN release of HTML-FormFu-Model-DBIC ?
> 
> I believe there was a change in that, that was also required.
> 
> Cheers,
> Carl
> 
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu



More information about the HTML-FormFu mailing list