Apache-Wyrd

 view release on metacpan or  search on metacpan

Wyrd/Form/Template.pm  view on Meta::CPAN

#Copyright barry king <barry@wyrdwright.com> and released under the GPL.
#See http://www.gnu.org/licenses/gpl.html#TOC1 for details
use 5.006;
use strict;
use warnings;
no warnings qw(uninitialized);

package Apache::Wyrd::Form::Template;
our $VERSION = '0.98';
use base qw(Apache::Wyrd);

=pod

=head1 NAME

Apache::Wyrd::Form::Template - Sub-form unit Wyrd

=head1 SYNOPSIS

    <BASENAME::SQLForm index="user_id" table="users">
      <BASENAME::Form::Template name="password">
        <BASENAME::Form::Preload>
          <BASENAME::Defaults>
            select 'root' as user_id;
          </BASENAME::Defaults>
          <BASENAME::Query>
            select user_id from users where name='Groucho'
          </BASENAME::Query>
        </BASENAME::Form::Preload>
        <b>Enter Password:</b><br>
        <BASENAME::Input name="password" type="password" />
        <BASENAME::Input name="user_id" type="hidden" />
      </BASENAME::Form::Template>
      <BASENAME::Form::Template name="result">
        <H1>Status: $:_status</H1>
        <HR>
        <P>$:_message</P>
      </BASENAME::Form::Template>
    </BASENAME::SQLForm>

=head1 DESCRIPTION

Every Form must have at least one Template.  Each Template is arranged
in order by default representing each step in a multiple-page form, with
each Template a step in that sequence.

=head2 HTML ATTRIBUTES

=over

=item name

Name of the form.  Required, and must be different from the name of any
other template.

=item action

What action to perform on the submission of this template.  If set,
changes the sequence of the submission, and can move the flow of
information entry to an entirely different page and continuing the form
sequence from that entry-point.

=back

=head2 PERL METHODS

I<(format: (returns) name (arguments after self))>

=over

=item (scalar) C<action> (void)

(Read-only) Returns the B<action> attribute

=cut

sub action {
	my $self = shift;
	return $self->{'action'};
}

=pod

=item (scalar) C<name> (void)

(Read-only) Returns the B<name> attribute

=cut

sub name {
	my $self = shift;



( run in 1.480 second using v1.01-cache-2.11-cpan-5a3173703d6 )