FAQ
Hi dudes and dudettes,

I'm new to Catalyst and am following the example set out in Chapter 3 of 'The Book' (I've bought the book but have only got this far). I have a problem with Formbuilder not rendering the form for editing an address. Editing a person works fine.

I've added some debug code to check that the formbuilder object is generated correctly (which it appears to be) however when I call the render method in the TT I do not get the form. Can you tell me what I'm doing wrong?

Below is the code needed for the form and an example output using the address_test.pl script:

# from lib/AddressBook/Controller/Address.pm
sub edit :Local Form {
my ($self, $c, $address_id, $person_id) = @_;
my $form = $self->formbuilder;
my $address;

$c->log->debug('$form = '. $form->render());

if (!$address_id && $person_id) {
# adding new address to existing person
my $person = $c->model('AddressDB::People')->find({id => $person_id});
if (!$person) {
$c->stash->{error} = 'No such person!';
$c->detach('/person/list');
}

$address = $c->model('AddressDB::Addresses')->new({person => $person});
}
else {
$address = $c->model('AddressDB::Addresses')->find({id => $address_id});
if (!$address) {
$c->stash->{error} = 'No such address!';
$c->detach('/person/list');
}
}

if ($form->submitted && $form->validate) {
# transfer data from form to database
$address->location($form->field('location'));
$address->postal ($form->field('postal') );
$address->phone ($form->field('phone') );
$address->email ($form->field('email') );

$address->insert_or_update;

$c->stash->{message} ($address_id > 0 ? 'Updated ' : 'Added new ') . 'address for ' .
$address->person->name;
}
else {
# transfer data from database to form
$c->stash->{address} = $address;

if (!$address_id) {
$c->stash->{message} = 'Adding a new address ';
}
else {
$c->stash->{message} = 'Updating an address ';
}
$c->stash->{message} .= 'for ' . $address->person->name;

$form->field(name => 'location', value => $address->location);
$form->field(name => 'postal', value => $address->postal );
$form->field(name => 'phone', value => $address->phone );
$form->field(name => 'email', value => $address->email );
}

$c->detach('/person/list');
}

# from root/src/address/edit.tt2
[% META title = "Address" %]
<p>Here's some text explaining the form below. Only the "location" field is required, etc, etc.</p>
[% FormBuilder.render %]

# from root/forms/address/edit.fb
name: address_edit
method: POST
header: 1
title: Address
fields:
location:
label: Location
type: select
options: Home, Office, Mobile
other: 1
required: 1

postal:
label: Mailing Address
type: textarea
rows: 4
cols: 60

phone:
label: Phone Number
validate: PHONE

email:
label: E-Mail Address
validate: EMAIL
./script/addressbook_test.pl /address/add/2
[debug] Debug messages enabled
[debug] Statistics enabled
[debug] Loaded plugins:
.----------------------------------------------------------------------------.
Catalyst::Plugin::ConfigLoader 0.30 |
'----------------------------------------------------------------------------'

[debug] Loaded dispatcher "Catalyst::Dispatcher"
[debug] Loaded engine "Catalyst::Engine::CGI"
[debug] Found home "/Users/dg/git/AddressBook"
[debug] Loaded Config "/Users/dg/git/AddressBook/addressbook.conf"
[debug] Loaded components:
.-----------------------------------------------------------------+----------.
Class | Type |
+-----------------------------------------------------------------+----------+
AddressBook::Controller::Address | instance |
AddressBook::Controller::Person | instance |
AddressBook::Controller::Root | instance |
AddressBook::Model::AddressDB | instance |
AddressBook::Model::AddressDB::Addresses | class |
AddressBook::Model::AddressDB::People | class |
AddressBook::View::HTML | instance |
'-----------------------------------------------------------------+----------'

[debug] Loaded Private actions:
.----------------------+--------------------------------------+--------------.
Private | Class | Method |
+----------------------+--------------------------------------+--------------+
/default | AddressBook::Controller::Root | default |
/end | AddressBook::Controller::Root | end |
/index | AddressBook::Controller::Root | index |
/person/add | AddressBook::Controller::Person | add |
/person/edit | AddressBook::Controller::Person | edit |
/person/index | AddressBook::Controller::Person | index |
/person/delete | AddressBook::Controller::Person | delete |
/person/list | AddressBook::Controller::Person | list |
/address/index | AddressBook::Controller::Address | index |
/address/add | AddressBook::Controller::Address | add |
/address/delete | AddressBook::Controller::Address | delete |
/address/edit | AddressBook::Controller::Address | edit |
'----------------------+--------------------------------------+--------------'

[debug] Loaded Path actions:
.-------------------------------------+--------------------------------------.
Path | Private |
+-------------------------------------+--------------------------------------+
/ | /index |
/ | /default |
/address | /address/index |
/address/add | /address/add |
/address/delete | /address/delete |
/address/edit | /address/edit |
/person | /person/index |
/person/add | /person/add |
/person/delete | /person/delete |
/person/edit | /person/edit |
/person/list | /person/list |
'-------------------------------------+--------------------------------------'

[info] AddressBook powered by Catalyst 5.80029
[CGI::FormBuilder::Messages::new] (debug1) creating Messages object from (default)
[CGI::FormBuilder::new] (debug1) creating fields list
[CGI::FormBuilder::new] (debug2) assuming fields list from ARRAY
[CGI::FormBuilder::new_field] (debug1) called $form->new_field(location)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field location
[CGI::FormBuilder::new] (debug2) push @(), location
[CGI::FormBuilder::new_field] (debug1) called $form->new_field(postal)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field postal
[CGI::FormBuilder::new] (debug2) push @(location), postal
[CGI::FormBuilder::new_field] (debug1) called $form->new_field(phone)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field phone
[CGI::FormBuilder::new] (debug2) push @(location postal), phone
[CGI::FormBuilder::new_field] (debug1) called $form->new_field(email)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field email
[CGI::FormBuilder::new] (debug2) push @(location postal phone), email
[CGI::FormBuilder::new] (debug1) field creation done, list = (location postal phone email)
[CGI::FormBuilder::Source::File::parse] (debug1) parsing /Users/dg/git/AddressBook/root/forms/address/edit.fb as input source
[CGI::FormBuilder::Source::File::parse] (debug2) [1 >= 0, inval=0] term=name; line­dress_edit
[CGI::FormBuilder::Source::File::parse] (debug2) name = address_edit (1 < 1)
[CGI::FormBuilder::Source::File::parse] (debug2) [1 >= 1, inval=0] term=method; line=POST
[CGI::FormBuilder::Source::File::parse] (debug2) method = POST (1 < 1)
[CGI::FormBuilder::Source::File::parse] (debug2) [1 >= 1, inval=0] term=header; line=1
[CGI::FormBuilder::Source::File::parse] (debug2) header = 1 (1 < 1)
[CGI::FormBuilder::Source::File::parse] (debug2) [1 >= 1, inval=0] term=title; line­dress
[CGI::FormBuilder::Source::File::parse] (debug2) title = Address (1 < 1)
[CGI::FormBuilder::Source::File::parse] (debug2) [1 >= 1, inval=0] term=fields; line[CGI::FormBuilder::Source::File::parse] (debug2) fields: new level (1 < 1)
[CGI::FormBuilder::Source::File::parse] (debug2) [3 >= 1, inval=0] term=location; line[CGI::FormBuilder::Source::File::parse] (debug2) location: new level (3 < 1)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 3, inval=0] term=label; line=Location
[CGI::FormBuilder::Source::File::parse] (debug2) label = Location (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=type; line=select
[CGI::FormBuilder::Source::File::parse] (debug2) type = select (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=options; line=Home, Office, Mobile
[CGI::FormBuilder::Source::File::parse] (debug2) options = Home, Office, Mobile (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=other; line=1
[CGI::FormBuilder::Source::File::parse] (debug2) other = 1 (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=required; line=1
[CGI::FormBuilder::Source::File::parse] (debug2) required = 1 (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [3 >= 5, inval=0] term=postal; line[CGI::FormBuilder::Source::File::parse] (debug2) postal: new level (3 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 3, inval=0] term=label; line=Mailing Address
[CGI::FormBuilder::Source::File::parse] (debug2) label = Mailing Address (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=type; line=textarea
[CGI::FormBuilder::Source::File::parse] (debug2) type = textarea (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=rows; line=4
[CGI::FormBuilder::Source::File::parse] (debug2) rows = 4 (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=cols; line`
[CGI::FormBuilder::Source::File::parse] (debug2) cols = 60 (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [3 >= 5, inval=0] term=phone; line[CGI::FormBuilder::Source::File::parse] (debug2) phone: new level (3 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 3, inval=0] term=label; line=Phone Number
[CGI::FormBuilder::Source::File::parse] (debug2) label = Phone Number (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=validate; line=PHONE
[CGI::FormBuilder::Source::File::parse] (debug2) validate = PHONE (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [3 >= 5, inval=0] term=email; line[CGI::FormBuilder::Source::File::parse] (debug2) email: new level (3 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 3, inval=0] term=label; line=E-Mail Address
[CGI::FormBuilder::Source::File::parse] (debug2) label = E-Mail Address (5 < 3)
[CGI::FormBuilder::Source::File::parse] (debug2) [5 >= 5, inval=1] term=validate; line=EMAIL
[CGI::FormBuilder::Source::File::parse] (debug2) validate = EMAIL (5 < 3)
[CGI::FormBuilder::new] (debug1) constructing new FormBuilder object
[CGI::FormBuilder::Messages::new] (debug1) creating Messages object from (default)
[CGI::FormBuilder::new] (debug1) creating fields list
[CGI::FormBuilder::new] (debug2) assuming fields list from ARRAY
[CGI::FormBuilder::new_field] (debug1) called $form->new_field(location)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field location
[CGI::FormBuilder::new] (debug2) push @(), location
[CGI::FormBuilder::new_field] (debug1) called $form->new_field(postal)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field postal
[CGI::FormBuilder::new] (debug2) push @(location), postal
[CGI::FormBuilder::new_field] (debug1) called $form->new_field(phone)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field phone
[CGI::FormBuilder::new] (debug2) push @(location postal), phone
[CGI::FormBuilder::new_field] (debug1) called $form->new_field(email)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args->{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field email
[CGI::FormBuilder::new] (debug2) push @(location postal phone), email
[CGI::FormBuilder::new] (debug1) field creation done, list = (location postal phone email)
[CGI::FormBuilder::render] (debug1) starting $form->render()
[CGI::FormBuilder::prepare] (debug1) Calling $form->prepare()
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::Field::tag_value] (debug2) location: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) location: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) location: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) location: called $field->inflate_value
[CGI::FormBuilder::Field::type] (debug2) location: called $field->type (manual = 'select')
[CGI::FormBuilder::Field::type] (debug1) location: field set to type 'select' (reblessing)
[CGI::FormBuilder::Field::tag_value] (debug2) location: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) location: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) location: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) location: called $field->inflate_value
[CGI::FormBuilder::Field::type] (debug2) location: called $field->type (manual = 'select')
[CGI::FormBuilder::Field::tag_value] (debug2) location: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) location: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) location: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) location: called $field->inflate_value
[CGI::FormBuilder::Field::select::tag] (debug2) my(Home Office Mobile) = $field->options
[CGI::FormBuilder::Field::select::tag] (debug2) location: generating select input type
[CGI::FormBuilder::Field::tag_value] (debug2) location: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) location: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) location: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) location: called $field->inflate_value
[CGI::FormBuilder::Field::select::tag] (debug2) location: rendering options: (ARRAY(0x10343cfb8) Home Office Mobile ARRAY(0x10343cfd0))
[CGI::FormBuilder::Field::select::tag] (debug2) optval(ARRAY(0x10343cfb8)) = (,-select-,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option -select-
[CGI::FormBuilder::Field::select::tag] (debug2) optval(Home) = (Home,,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option Home
[CGI::FormBuilder::Field::select::tag] (debug2) optval(Office) = (Office,,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option Office
[CGI::FormBuilder::Field::select::tag] (debug2) optval(Mobile) = (Mobile,,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option Mobile
[CGI::FormBuilder::Field::select::tag] (debug2) optval(ARRAY(0x10343cfd0)) = (_other_location,Other:,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option Other:
[CGI::FormBuilder::Field::select::tag] (debug2) location: generated tag = <select id="location" name="location" onchange="if (this.selectedIndex + 1 == this.options.length) { fb_other_on('_other_location') } else { fb_other_off('_other_location') }">
<option value="">-select-</option>
<option value="Home">Home</option>
<option value="Office">Office</option>
<option value="Mobile">Mobile</option>
<option value="_other_location">Other:</option>
</select> <input disabled="disabled" id="_other_location" name="_other_location" type="text" />
[CGI::FormBuilder::Field::type] (debug2) location: called $field->type (manual = 'select')
[CGI::FormBuilder::Field::tag_value] (debug2) postal: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) postal: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) postal: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) postal: called $field->inflate_value
[CGI::FormBuilder::Field::type] (debug2) postal: called $field->type (manual = 'textarea')
[CGI::FormBuilder::Field::type] (debug1) postal: field set to type 'textarea' (reblessing)
[CGI::FormBuilder::Field::tag_value] (debug2) postal: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) postal: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) postal: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) postal: called $field->inflate_value
[CGI::FormBuilder::Field::tag_value] (debug2) postal: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) postal: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) postal: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) postal: called $field->inflate_value
[CGI::FormBuilder::Field::textarea::tag] (debug2) postal: generated tag = <textarea cols="60" id="postal" name="postal" rows="4"></textarea>
[CGI::FormBuilder::Field::type] (debug2) postal: called $field->type (manual = 'textarea')
[CGI::FormBuilder::Field::tag_value] (debug2) phone: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) phone: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) phone: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) phone: called $field->inflate_value
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::type] (debug1) phone: input type not set, checking for options
[CGI::FormBuilder::Field::type] (debug2) no options found
[CGI::FormBuilder::Field::type] (debug1) phone: field set to type 'text' (reblessing)
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::tag_value] (debug2) phone: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) phone: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) phone: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) phone: called $field->inflate_value
[CGI::FormBuilder::Field::tag_value] (debug2) phone: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) phone: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) phone: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) phone: called $field->inflate_value
[CGI::FormBuilder::Field::text::tag] (debug2) my() = $field->options
[CGI::FormBuilder::Field::text::tag] (debug2) phone: generating text input type
[CGI::FormBuilder::Field::text::tag] (debug2) phone: generated tag = <input id="phone" name="phone" type="text" />
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::tag_value] (debug2) email: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) email: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) email: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) email: called $field->inflate_value
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::Field::type] (debug1) email: input type not set, checking for options
[CGI::FormBuilder::Field::type] (debug2) no options found
[CGI::FormBuilder::Field::type] (debug1) email: field set to type 'text' (reblessing)
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::Field::tag_value] (debug2) email: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) email: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) email: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) email: called $field->inflate_value
[CGI::FormBuilder::Field::tag_value] (debug2) email: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) email: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) email: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) email: called $field->inflate_value
[CGI::FormBuilder::Field::text::tag] (debug2) my() = $field->options
[CGI::FormBuilder::Field::text::tag] (debug2) email: generating text input type
[CGI::FormBuilder::Field::text::tag] (debug2) email: generated tag = <input id="email" name="email" type="text" />
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::prepare] (debug2) $tmplvar{jshead} = $self->script
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::Field::type] (debug2) location: called $field->type (manual = 'select')
[CGI::FormBuilder::Field::jsfield] (debug2) return '' unless auto && ( || 1)
[CGI::FormBuilder::Field::jsfield] (debug1) location: generating JavaScript validation code
[CGI::FormBuilder::Field::type] (debug2) location: called $field->type (manual = 'select')
[CGI::FormBuilder::Field::type] (debug2) postal: called $field->type (manual = 'textarea')
[CGI::FormBuilder::Field::jsfield] (debug2) return '' unless auto && ( || )
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::jsfield] (debug2) return '' unless auto && (PHONE || )
[CGI::FormBuilder::Field::jsfield] (debug1) phone: generating JavaScript validation code
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::Field::jsfield] (debug2) return '' unless auto && (EMAIL || )
[CGI::FormBuilder::Field::jsfield] (debug1) email: generating JavaScript validation code
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::prepare] (debug2) $tmplvar{title} = $self->title
[CGI::FormBuilder::prepare] (debug2) $tmplvar{start} = $self->start . $self->statetags . $self->keepextras
[CGI::FormBuilder::prepare] (debug2) $tmplvar{submit} = $self->submit
[CGI::FormBuilder::prepare] (debug2) $tmplvar{reset} = $self->reset
[CGI::FormBuilder::prepare] (debug2) $tmplvar{end} = $self->end
[CGI::FormBuilder::prepare] (debug2) $tmplvar{invalid} = $self->invalid
[CGI::FormBuilder::prepare] (debug2) $tmplvar{required} = $self->required
[CGI::FormBuilder::prepare] (debug2) $tmplvar{fields} = [ map $tmplvar{field}{$_}, $self->field ]
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::render] (debug1) loading CGI::FormBuilder::Template::Builtin for 'template' option
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::Field::type] (debug2) location: called $field->type (manual = 'select')
[CGI::FormBuilder::Field::jsfield] (debug2) return '' unless auto && ( || 1)
[CGI::FormBuilder::Field::jsfield] (debug1) location: generating JavaScript validation code
[CGI::FormBuilder::Field::type] (debug2) location: called $field->type (manual = 'select')
[CGI::FormBuilder::Field::type] (debug2) postal: called $field->type (manual = 'textarea')
[CGI::FormBuilder::Field::jsfield] (debug2) return '' unless auto && ( || )
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::jsfield] (debug2) return '' unless auto && (PHONE || )
[CGI::FormBuilder::Field::jsfield] (debug1) phone: generating JavaScript validation code
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::Field::jsfield] (debug2) return '' unless auto && (EMAIL || )
[CGI::FormBuilder::Field::jsfield] (debug1) email: generating JavaScript validation code
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::fieldsets] (debug2) added fieldset (legend=) to @sets
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::fieldlist] (debug2) appended non-fieldset field location to form
[CGI::FormBuilder::fieldlist] (debug2) appended non-fieldset field postal to form
[CGI::FormBuilder::fieldlist] (debug2) appended non-fieldset field phone to form
[CGI::FormBuilder::fieldlist] (debug2) appended non-fieldset field email to form
[CGI::FormBuilder::Field::type] (debug2) location: called $field->type (manual = 'select')
[CGI::FormBuilder::Field::type] (debug2) postal: called $field->type (manual = 'textarea')
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::fieldsets] (debug2) added fieldset (legend=) to @sets
[CGI::FormBuilder::field] (debug2) called $form->field()
[CGI::FormBuilder::field] (debug2) return (location postal phone email)
[CGI::FormBuilder::Template::Builtin::prepare] (debug2) render: attacking normal field 'location'
[CGI::FormBuilder::Field::tag_value] (debug2) location: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) location: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) location: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) location: called $field->inflate_value
[CGI::FormBuilder::Field::tag_value] (debug2) location: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) location: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) location: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) location: called $field->inflate_value
[CGI::FormBuilder::Field::select::tag] (debug2) my(Home Office Mobile) = $field->options
[CGI::FormBuilder::Field::select::tag] (debug2) location: generating select input type
[CGI::FormBuilder::Field::tag_value] (debug2) location: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) location: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) location: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) location: called $field->inflate_value
[CGI::FormBuilder::Field::select::tag] (debug2) location: rendering options: (ARRAY(0x102529858) Home Office Mobile ARRAY(0x1025332a0))
[CGI::FormBuilder::Field::select::tag] (debug2) optval(ARRAY(0x102529858)) = (,-select-,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option -select-
[CGI::FormBuilder::Field::select::tag] (debug2) optval(Home) = (Home,,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option Home
[CGI::FormBuilder::Field::select::tag] (debug2) optval(Office) = (Office,,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option Office
[CGI::FormBuilder::Field::select::tag] (debug2) optval(Mobile) = (Mobile,,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option Mobile
[CGI::FormBuilder::Field::select::tag] (debug2) optval(ARRAY(0x1025332a0)) = (_other_location,Other:,)
[CGI::FormBuilder::Field::select::tag] (debug2) location: tag .= option Other:
[CGI::FormBuilder::Field::select::tag] (debug2) location: generated tag = <select id="location" name="location" onchange="if (this.selectedIndex + 1 == this.options.length) { fb_other_on('_other_location') } else { fb_other_off('_other_location') }">
<option value="">-select-</option>
<option value="Home">Home</option>
<option value="Office">Office</option>
<option value="Mobile">Mobile</option>
<option value="_other_location">Other:</option>
</select> <input disabled="disabled" id="_other_location" name="_other_location" type="text" />
[CGI::FormBuilder::Template::Builtin::prepare] (debug2) render: attacking normal field 'postal'
[CGI::FormBuilder::Field::tag_value] (debug2) postal: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) postal: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) postal: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) postal: called $field->inflate_value
[CGI::FormBuilder::Field::tag_value] (debug2) postal: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) postal: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) postal: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) postal: called $field->inflate_value
[CGI::FormBuilder::Field::textarea::tag] (debug2) postal: generated tag = <textarea cols="60" id="postal" name="postal" rows="4"></textarea>
[CGI::FormBuilder::Template::Builtin::prepare] (debug2) render: attacking normal field 'phone'
[CGI::FormBuilder::Field::type] (debug2) phone: called $field->type (manual = '')
[CGI::FormBuilder::Field::tag_value] (debug2) phone: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) phone: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) phone: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) phone: called $field->inflate_value
[CGI::FormBuilder::Field::tag_value] (debug2) phone: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) phone: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) phone: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) phone: called $field->inflate_value
[CGI::FormBuilder::Field::text::tag] (debug2) my() = $field->options
[CGI::FormBuilder::Field::text::tag] (debug2) phone: generating text input type
[CGI::FormBuilder::Field::text::tag] (debug2) phone: generated tag = <input id="phone" name="phone" type="text" />
[CGI::FormBuilder::Template::Builtin::prepare] (debug2) render: attacking normal field 'email'
[CGI::FormBuilder::Field::type] (debug2) email: called $field->type (manual = '')
[CGI::FormBuilder::Field::tag_value] (debug2) email: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) email: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) email: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) email: called $field->inflate_value
[CGI::FormBuilder::Field::tag_value] (debug2) email: called $field->tag_value
[CGI::FormBuilder::Field::tag_value] (debug2) email: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) email: called $field->cgi_value
[CGI::FormBuilder::Field::tag_value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) email: called $field->inflate_value
[CGI::FormBuilder::Field::text::tag] (debug2) my() = $field->options
[CGI::FormBuilder::Field::text::tag] (debug2) email: generating text input type
[CGI::FormBuilder::Field::text::tag] (debug2) email: generated tag = <input id="email" name="email" type="text" />
[CGI::FormBuilder::render] (debug1) returning CGI::FormBuilder::Template::Builtin=HASH(0x1025388d0)->render(HASH(0x1024745a8))
[CGI::FormBuilder::field] (debug2) called $form->field(name location value )
[CGI::FormBuilder::field] (debug2) searching fields for 'location'
[CGI::FormBuilder::Field::value] (debug2) location: called $field->value()
[CGI::FormBuilder::Field::value] (debug2) location: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) location: called $field->cgi_value
[CGI::FormBuilder::Field::value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) location: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) location: called $field->inflate_value
[CGI::FormBuilder::field] (debug2) called $form->field(name postal value )
[CGI::FormBuilder::field] (debug2) searching fields for 'postal'
[CGI::FormBuilder::Field::value] (debug2) postal: called $field->value()
[CGI::FormBuilder::Field::value] (debug2) postal: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) postal: called $field->cgi_value
[CGI::FormBuilder::Field::value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) postal: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) postal: called $field->inflate_value
[CGI::FormBuilder::field] (debug2) called $form->field(name phone value )
[CGI::FormBuilder::field] (debug2) searching fields for 'phone'
[CGI::FormBuilder::Field::value] (debug2) phone: called $field->value()
[CGI::FormBuilder::Field::value] (debug2) phone: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) phone: called $field->cgi_value
[CGI::FormBuilder::Field::value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) phone: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) phone: called $field->inflate_value
[CGI::FormBuilder::field] (debug2) called $form->field(name email value )
[CGI::FormBuilder::field] (debug2) searching fields for 'email'
[CGI::FormBuilder::Field::value] (debug2) email: called $field->value()
[CGI::FormBuilder::Field::value] (debug2) email: sticky && ! force
[CGI::FormBuilder::Field::cgi_value] (debug2) email: called $field->cgi_value
[CGI::FormBuilder::Field::value] (debug2) no cgi found, returning def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: called $field->def_value
[CGI::FormBuilder::Field::def_value] (debug2) email: def value = ()
[CGI::FormBuilder::Field::inflate_value] (debug2) email: called $field->inflate_value
[info] *** Request 1 (1.000/s) [6881] [Thu Mar 10 22:13:39 2011] ***
[debug] "GET" request for "address/add/2" from "127.0.0.1"
[debug] Path is "address/add"
[debug] Arguments are "2"
[debug] Form (address/edit): Looking for config file address/edit.fb
[debug] Form (address/edit): Found form config /Users/dg/git/AddressBook/root/forms/address/edit.fb
[debug] Form (address/edit): Looking for config file address/edit.fb
[debug] Form (address/edit): Found form config /Users/dg/git/AddressBook/root/forms/address/edit.fb
[debug] $form = <script type="text/javascript"><!-- hide from old browsers
// turn on/off any "other"fields
function fb_other_on (othername) {
var box = document.getElementById(othername);
box.removeAttribute('disabled');
}

function fb_other_off (othername) {
var box = document.getElementById(othername);
box.setAttribute('disabled', 'disabled');
}

function validate_address_edit (form) {
var alertstr = '';
var invalid = 0;
var invalid_fields = new Array();

// location: select list, always assume it's multiple to get all values
var location = null;
var selected_location = 0;
for (var loop = 0; loop < form.elements['location'].options.length; loop++) {
if (form.elements['location'].options[loop].selected) {
location = form.elements['location'].options[loop].value;
selected_location++;
if (location == '_other_location') location = form.elements['_other_location'].value;
if (location == null || location === "") {
alertstr += '- Invalid entry for the "Location" field\n';
invalid++;
invalid_fields.push('location');
}
} // if
} // for location
if (! selected_location) {
alertstr += '- Invalid entry for the "Location" field\n';
invalid++;
}

// phone: standard text, hidden, password, or textarea box
var phone = form.elements['phone'].value;
if (phone != null && phone != "" && ! phone.match(/^\d{3}\-\d{3}\-\d{4}$|^\(\d{3}\)\s+\d{3}\-\d{4}$/)) {
alertstr += '- Invalid entry for the "Phone Number" field\n';
invalid++;
invalid_fields.push('phone');
}
// email: standard text, hidden, password, or textarea box
var email = form.elements['email'].value;
if (email != null && email != "" && ! email.match(/^[\w\-\+\._]+\@[a-zA-Z0-9][-a-zA-Z0-9\.]*\.[a-zA-Z]+$/)) {
alertstr += '- Invalid entry for the "E-Mail Address" field\n';
invalid++;
invalid_fields.push('email');
}
if (invalid > 0 || alertstr != '') {
if (! invalid) invalid = 'The following'; // catch for programmer error
alert(''+invalid+' error(s) were encountered with your submission:'+'\n\n'
+alertstr+'\n'+'Please correct these fields and try again.');
return false;
}
return true; // all checked ok
}
//-->
</script>
<noscript><font color="#cc0000"><b>Please enable Javascript or use a newer browser.</b></font></noscript>
<p>Fields that are <b>highlighted</b> are required.</p>

<!-- Generated by CGI::FormBuilder v3.0501 available from www.formbuilder.org -->
<form action="/address/add/2" id="address_edit" method="post" name="address_edit" onsubmit="return validate_address_edit(this);">
<div id="address_edit_state"><input id="_submitted_address_edit" name="_submitted_address_edit" type="hidden" value="1" /></div>
<table id="address_edit_body">
<tr id="address_edit_location_row" valign="top">
<td id="address_edit_location_label"><b>Location</b></td>
<td id="address_edit_location_field"><select id="location" name="location" onchange="if (this.selectedIndex + 1 == this.options.length) { fb_other_on('_other_location') } else { fb_other_off('_other_location') }">
<option value="">-select-</option>
<option value="Home">Home</option>
<option value="Office">Office</option>
<option value="Mobile">Mobile</option>
<option value="_other_location">Other:</option>
</select> <input disabled="disabled" id="_other_location" name="_other_location" type="text" /></td>
</tr>
<tr id="address_edit_postal_row" valign="top">
<td id="address_edit_postal_label">Mailing Address</td>
<td id="address_edit_postal_field"><textarea cols="60" id="postal" name="postal" rows="4"></textarea></td>
</tr>
<tr id="address_edit_phone_row" valign="top">
<td id="address_edit_phone_label">Phone Number</td>
<td id="address_edit_phone_field"><input id="phone" name="phone" type="text" /></td>
</tr>
<tr id="address_edit_email_row" valign="top">
<td id="address_edit_email_label">E-Mail Address</td>
<td id="address_edit_email_field"><input id="email" name="email" type="text" /></td>
</tr>
<tr id="address_edit_submit_row" valign="top">
<td align="center" colspan="2" id="address_edit_submit_field"><input id="address_edit_submit" name="_submit" type="submit" value="Submit" /></td>
</tr>
</table>
</form>
[debug] Rendering template "address/edit.tt2"
[debug] Response Code: 200; Content-Type: text/html; charset=utf-8; Content-Length: 1188
[info] Request took 0.413933s (2.416/s)
.------------------------------------------------------------+-----------.
Action | Time |
+------------------------------------------------------------+-----------+
/address/add | 0.359529s |
/address/edit | 0.353808s |
-> /person/list | 0.000526s |
/end | 0.051051s |
-> AddressBook::View::HTML->process | 0.050243s |
'------------------------------------------------------------+-----------'

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Address</title>
<style type="text/css">

html {
height: 100%;
}

body {
background-color: #ffffff;
color: #46494c;
margin: 0px;
padding: 0px;
height: 100%;
}

#header {
background-color: #e3e6ea;
border-bottom: 1px solid #f08900;
}

#footer {
background-color: #e3e6ea;
text-align: center;
border-top: 1px solid #f08900;
position: absolute;
bottom: 0;
left: 0px;
width: 100%;
padding: 4px;
}

#content {
padding: 10px;
}

h1.title {
padding: 4px;
margin: 0px;
}

.message {
color: #66AA66;
}

.error {
color: #CC4444;
}

</style>
</head>
<body>
<div id="header"><!-- BEGIN site/header -->
<h1 class="title">Address</h1>
<!-- END site/header -->
</div>

<div id="content">


<p><span class="message">Adding a new address for willy wonka</span></p>


<p>Here's some text explaining the form below. Only the "location" field is required, etc, etc.</p>

</div>

<div id="footer"><!-- BEGIN site/footer -->
<div id="copyright">&copy; 2011 Your Name Here</div>
<!-- END site/footer -->
</div>

</body>
</html>


--
Cheers
Dg

Search Discussions

  • Dave Gethings at Mar 20, 2011 at 2:40 pm
    Thanks David.

    The book does say that FormBuilder appears to be no longer maintained and recommends using FormFu. But for the tutorial it uses FormBuilder.

    I've managed to resolve this issue by adding $c->stash->{FormBuilder} = $form; to the method.

    Odd that it works for one controller but not another. Given FormBuilder is deprecated I won't be losing too much sleep over the hack I've added. ;)
    On 11 Mar 2011, at 07:32, David Schmidt wrote:

    I think your book is outdated.
    Last FormBuilder Release was 2007,

    The book featured by the irc channel is:
    buy the book! http://xrl.us/be3fh2, and write a review: http://xrl.us/be5zua

    So go with HTML::FormHandler or FormFu (I prefer the Formhandler)

    cheers
    david
    --
    Cheers
    Dg

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMar 10, '11 at 10:22p
activeMar 20, '11 at 2:40p
posts2
users1
websitecatalystframework.org
irc#catalyst

1 user in discussion

Dave Gethings: 2 posts

People

Translate

site design / logo © 2022 Grokbase