The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache::Wyrd::Defaults - Default data for a Form Wyrd

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>
  

DESCRIPTION

Provide default values to a parent object. The parent must have a register_defaults method to which Defaults passes itself. The defaults are given in the form of a query, and the sh method accesses the statement handle of that query. This Wyrd was designed to be used with an Apache::Wyrd::Form::Preload object.

HTML ATTRIBUTES

See Apache::Wyrd::Query.

PERL METHODS

See Apache::Wyrd::Query.

BUGS/CAVEATS/RESERVED METHODS

Reserves the _setup, _format_output, and _generate_output methods.

AUTHOR

Barry King <wyrd@nospam.wyrdwright.com>

SEE ALSO

Apache::Wyrd

General-purpose HTML-embeddable perl object

Apache::Wyrd::Form

Build complex HTML forms from Wyrds

LICENSE

Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.

See LICENSE under the documentation for Apache::Wyrd.