GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TEMPLATE::PLUGIN::HTML::SUPERFORM (3)

.ds Aq ’

NAME

Template::Plugin::HTML::SuperForm - Template Plugin for HTML::SuperForm

CONTENTS

SYNOPSIS



 [% USE form = HTML.SuperForm %]
 [% form.text(name => my_text, default => default text) %]



DESCRIPTION

This is an interface into HTML::SuperForm through the Template Toolkit. When created without arguments (i.e. [% USE form = HTML.SuperForm %]), the Template’s stash is searched for an Apache object or a CGI object to pass to HTML::SuperForm’s constructor.

When created with arguments (i.e. [% USE form = HTML.SuperForm(arg) %]), the arguments are passed to HTML::SuperForm’s constructor.

USES

With mod_perl:



    myHandler.pm:
    package myHandler;

    use Apache::Constants qw(OK);
    use Template;

    sub handler {
        my $r = shift;

        my $tt = Template->new();

        $r->content_type(text/html);
        $r->send_http_header();

        $tt->process(my_template.tt, { r => $r });

        return OK;
    }

    my_template.tt:
    [% USE form = HTML.SuperForm %]
    <html>
    <body>
        [% form.start_form(name => my_form) %]
        [% form.text(name => my_text, default => default text) %]
        [% form.submit %]
        [% form.end_form %]
    </body>
    </html>



With CGI:



    cgi-script:
    use Template;

    print "Content-Type: text/html\n\n";
    my $tt = Template->new();
    $tt->process(my_template.tt);

    my_template.tt:
    [% USE CGI %]
    [% USE form = HTML.SuperForm %]
    <html>
    <body>
        [% form.start_form(name => my_form) %]
        [% form.text(name => my_text, default => default text) %]
        [% form.submit %]
        [% form.end_form %]
    </body>
    </html>



Without CGI or mod_perl:



    cgi-script:
    use Template;

    print "Content-Type: text/html\n\n";
    my $tt = Template->new();
    $tt->process(my_template.tt);

    my_template.tt:
    [% USE form = HTML.SuperForm %]
    <html>
    <body>
        [% form.start_form(name => my_form) %]
        [% form.text(name => my_text, default => default text) %]
        [% form.submit %]
        [% form.end_form %]
    </body>
    </html>



SEE ALSO

HTML::SuperForm

AUTHOR

John Allwine <jallwine86@yahoo.com>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TEMPLATE::PLUGIN::HTML::SUPERFORM (3) 2004-09-06

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.