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::Widget 1.11

    Download button

    No screenshots available
    Downloads: 379  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sebastian Riedel | More programs
    Perl Artistic License / FREE
    September 13th, 2007, 16:35 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    HTML::Widget description

    A Perl module with HTML Widget And Validation Framework.

    HTML::Widget is a Perl module with HTML Widget And Validation Framework.

    SYNOPSIS

    use HTML::Widget;

    # Create a widget
    my $w = HTML::Widget->new('widget')->method('get')->action('/');

    # Add a fieldset to contain the elements
    my $fs = $w->element( 'Fieldset', 'user' )->legend('User Details');

    # Add some elements
    $fs->element( 'Textfield', 'age' )->label('Age')->size(3);
    $fs->element( 'Textfield', 'name' )->label('Name')->size(60);
    $fs->element( 'Submit', 'ok' )->value('OK');

    # Add some constraints
    $w->constraint( 'Integer', 'age' )->message('No integer.');
    $w->constraint( 'Not_Integer', 'name' )->message('Integer.');
    $w->constraint( 'All', 'age', 'name' )->message('Missing value.');

    # Add some filters
    $w->filter('Whitespace');

    # Process
    my $result = $w->process;
    my $result = $w->process($query);


    # Check validation results
    my @valid_fields = $result->valid;
    my $is_valid = $result->valid('foo');
    my @invalid_fields = $result->have_errors;
    my $is_invalid = $result->has_errors('foo');;

    # CGI.pm-compatible! (read-only)
    my $value = $result->param('foo');
    my @params = $result->param;

    # Catalyst::Request-compatible
    my $value = $result->params->{foo};
    my @params = keys %{ $result->params };

    # Merge widgets (constraints and elements will be appended)
    $widget->merge($other_widget);

    # Embed widgets (as fieldset)
    $widget->embed($other_widget);

    # Get list of elements
    my @elements = $widget->get_elements;

    # Get list of constraints
    my @constraints = $widget->get_constraints;

    # Get list of filters
    my @filters = $widget->get_filters;

    Create easy to maintain HTML widgets!

    Everything is optional, use validation only or just generate forms, you can embed and merge them later.

    The API was designed similar to other popular modules like Data::FormValidator and FormValidator::Simple, HTML::FillInForm is also built in (and much faster).

    This Module is very powerful, don't misuse it as a template system!

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    HTML Widget | Validation Framework | Perl module | Widget | HTML | Widget

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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