Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    HTML::SuperForm 1.09

    Download button

    No screenshots available
    Downloads: 787  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.9/5)
    19 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    John Allwine | More programs
    Perl Artistic License / FREE
    June 6th, 2008, 03:56 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    HTML::SuperForm description

    A HTML form generator

    HTML::SuperForm is a HTML form generator.

    SYNOPSIS

    use HTML::SuperForm;
    use Apache::Constants qw(OK);

    sub handler {
    my $r = shift;

    my $form = HTML::SuperForm- >new($r);

    my $text = $form- >text(name = > 'text',
    default = > 'Default Text');

    my $textarea = $form- >textarea(name = > 'textarea',
    default = > 'More Default Text');

    my $select = $form- >select(name = > 'select',
    default = > 2,
    values = > [ 0, 1, 2, 3],
    labels = > {
    0 = > 'Zero',
    1 = > 'One',
    2 = > 'Two',
    3 = > 'Three'
    });

    my $output = < < "END_HTML";
    < html >
    < body >
    < form >
    Text Field: $text< br >
    Text Area: $textarea< br >
    Select: $select
    < /form >
    < /body >
    < /html >
    END_HTML


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

    $r- >print($output);
    return OK;
    }

    OR

    #!/usr/bin/perl

    my $form = HTML::SuperForm- >new();

    my $text = $form- >text(name = > 'text',
    default = > 'Default Text');

    my $textarea = $form- >textarea(name = > 'textarea',
    default = > 'More Default Text');

    my $select = $form- >select(name = > 'select',
    default = > 2,
    values = > [ 0, 1, 2, 3],
    labels = > {
    0 = > 'Zero',
    1 = > 'One',
    2 = > 'Two',
    3 = > 'Three'
    });

    my $output = < < "END_HTML";
    < html >
    < body >
    < form >
    Text Field: $text< br >
    Text Area: $textarea< br >
    Select: $select
    < /form >
    < /body >
    < /html >
    END_HTML

    print "Content-Type: text/htmlnn";
    print $output;


    Used in its basic form, this module provides an interface for generating basic HTML form elements much like HTML::StickyForms does. The main difference is HTML::SuperForm returns HTML::SuperForm::Field objects rather than plain HTML. This allows for more flexibilty when generating forms for a complex application.

    To get the most out of this module, use it as a base (Super) class for your own form object which generates your own custom fields. If you don't use it this way, I guess there's really nothing Super about it. Example are shown later in the document.

    The interface was designed with mod_perl and the Template Toolkit in mind, but it works equally well in any cgi environment.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    HTML forms | form generator | Perl module | HTML | form | generator

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM