Linux SoftwareProgrammingLibrariesClass::DBI::FormBuilder 0.481

Class::DBI::FormBuilder 0.481


Class::DBI::FormBuilder is a Perl module with Class::DBI/CGI::FormBuilder integration. SYNOPSIS package Film; use stri
Developer:   David Baird
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   44K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


Class::DBI::FormBuilder is a Perl module with Class::DBI/CGI::FormBuilder integration.

SYNOPSIS

package Film;
use strict;
use warnings;

use base 'Class::DBI';
use Class::DBI::FormBuilder;

# for indented output:
# use Class::DBI::FormBuilder PrettyPrint => 'ALL';

# POST all forms to server
Film->form_builder_defaults->{method} = 'post';

# customise how some fields are built:
# 'actor' is a has_a field, and the
# related table has 1000's of rows, so we don't want the default popup widget,
# we just want to show the current value
Film->form_builder_defaults->{process_fields}->{actor} = 'VALUE';

# 'trailer' stores an mpeg file, but CDBI::FB cannot automatically detect
# file upload fields, so need to tell it:
Film->form_builder_defaults->{process_fields}->{trailer} = 'FILE';

# has_a fields will be automatically set to 'required'. Additional fields can be specified:
Film->form_builder_defaults->{required} = qw( foo bar );



# In a nearby piece of code...

my $film = Film->retrieve( $id );
print $film->as_form( params => $q )->render; # or $r if mod_perl

# For a search app:
my $search_form = Film->search_form; # as_form plus a few tweaks


# A fairly complete mini-app:

my $form = Film->as_form( params => $q ); # or $r if mod_perl

if ( $form->submitted and $form->validate )
{
# whatever you need:

my $obj = Film->create_from_form( $form );
my $obj = Film->update_from_form( $form );
my $obj = Film->update_or_create_from_form( $form );
my $obj = Film->retrieve_from_form( $form );

my $iter = Film->search_from_form( $form );
my $iter = Film->search_like_from_form( $form );
my $iter = Film->search_where_from_form( $form );

my $obj = Film->find_or_create_from_form( $form );
my $obj = Film->retrieve_or_create_from_form( $form );

print $form->confirm;
}
else
{
print $form->render;
}

# See CGI::FormBuilder docs and website for lots more information.

Errata: use of column name/accessor/mutator is currently broken if your column accessors/mutators are different from the column name. The documentation is also broken w.r.t. this.

This module creates a CGI::FormBuilder form from a CDBI class or object. If from an object, it populates the form fields with the object's values.

Column metadata and CDBI relationships are analyzed and the fields of the form are modified accordingly. For instance, MySQL enum and set columns are configured as select, radiobutton or checkbox widgets as appropriate, and appropriate widgets are built for has_a, has_many and might_have relationships. Further relationships can be added by subclassing. has_a columns are set as 'required' fields in create/update forms.

Requirements:
  • Perl
    tags form form  from form  obj film  class dbi  film search  create from  builder defaults  form builder  film form  dbi formbuilder  film retrieve  cgi formbuilder  iter film  

    Download Class::DBI::FormBuilder 0.481


     http://ftp.casaafacerilor.ro/mirrors/CPAN/authors/id/D/DA/DAVEBAIRD/Class-DBI-FormBuilder-0.481.tar.gz


    Authors software

    Maypole::FormBuilder 0.44 (by David Baird)
    Maypole::FormBuilder is a Perl module with CGI::FormBuilder support in Maypole.

    SYNOPSIS

    use Maypole::Application qw( FormB

    Class::DBI::FormBuilder 0.481 (by David Baird)
    Class::DBI::FormBuilder is a Perl module with Class::DBI/CGI::FormBuilder integration.

    SYNOPSIS

    package Film;
    use stri


    Similar software

    Class::DBI::FormBuilder 0.481 (by David Baird)
    Class::DBI::FormBuilder is a Perl module with Class::DBI/CGI::FormBuilder integration.

    SYNOPSIS

    package Film;
    use stri

    DBIx::Class::FormTools 0.000004 (by David Jack Olrik)
    DBIx::Class::FormTools is a utility module for building forms with multiple related DBIx::Class objects.

    SYNOPSIS

    In the exampl

    Maypole::FormBuilder 0.44 (by David Baird)
    Maypole::FormBuilder is a Perl module with CGI::FormBuilder support in Maypole.

    SYNOPSIS

    use Maypole::Application qw( FormB

    Griffith 0.6.2 (by Vasco Nunes)
    Griffith is a film collection manager application

    Rose::HTML::Form 0.53 (by John C. Siracusa)
    Rose::HTML::Form is a HTML form base class.

    SYNOPSIS

    package PersonForm;

    use Rose::HTML::Form;
    our @ISA = qw(Rose::HT

    MVideo 0.89.99 (by Luca Roccia)

    Subtitlefix 0.2 (by Subtitlefix Team)
    Subtitlefix is intended for the correction it is file the subtitles (*..srt, *..sub), which are not synchronized with the film.

    Fo

    VideoGuide 0.21 (by Mikhail Stepanov)
    VideoGuide is content management system for video libraries

    Validate_fields Class 1.34 (by Olaf Lederer)
    Validate_fields Class is an easy-to-use form field validation PHP script

    Web Form Factory 0.1.3 (by WFF Team)
    Web Form Factory is a simple application that binds HTML forms to a database


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags