Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.066.242 Times

Rose::HTML::Form 0.53

  Date Added: June 22, 2010  |  Visits: 841

Rose::HTML::Form

Report Broken Link
Printer Friendly Version


Product Homepage
Download (73 downloads)

Rose::HTML::Form is a HTML form base class. SYNOPSIS package PersonForm; use Rose::HTML::Form; our @ISA = qw(Rose::HTML::Form); use Person; sub build_form { my($self) = shift; $self->add_fields ( name => { type => text, size => 25, required => 1 }, email => { type => email, size => 50, required => 1 }, phone => { type => phone }, ); } sub validate { my($self) = shift; # Base class will validate individual fields in isolation, # confirming that all required fields are filled in, and that # the email address and phone number are formatted correctly. my $ok = $self->SUPER::validate(@_); return $ok unless($ok); # Inter-field validation goes here if($self->field(name)->internal_value ne John Doe && $self->field(phone)->internal_value =~ /^555/) { $self->error(Only John Doe can have a 555 phone number.); return 0; } return 1; } sub init_with_person # give a friendlier name to a base-class method { my($self, $person) = @_; $self->init_with_object($person); } sub person_from_form { my($self) = shift; # Base class method does most of the work my $person = $self->object_from_form(class => Person); # Now fill in the non-obvious details... # e.g., set alt phone to be the same as the regular phone $person->alt_phone($self->field(phone)->internal_value); return $person; } ... # # Sample usage in a hypothetical web application # $form = PersonForm->new; if(...) { # Get query parameters in a hash ref and pass to the form my $params = MyWebServer->get_query_params(); $form->params($params); # ...or initialize form params from a CGI object # $form->params_from_cgi($cgi); # $cgi "isa" CGI # ...or initialize params from an Apache request object # (mod_perl 1 and 2 both supported) # $form->params_from_apache($r); # Initialize the fields based on params $form->init_fields(); unless($form->validate) { return error_page(error => $form->error); } $person = $form->person_from_form; # $person is a Person object do_something_with($person); ... } else { $person = ...; # Get or create a Person object somehow # Initialize the form with the Person object $form->init_with_person($person); # Pass the initialized form object to the template display_page(form => $form); } ... Rose::HTML::Form is more than just an object representation of the HTML tag. It is meant to be a base class for custom form classes that can be initialized with and return "rich" values such as objects, or collections of objects. Building up a reusable library of form classes is extremely helpful when building large web applications with forms that may appear in many different places. Similar forms can inherit from a common subclass, and forms may be nested. This class inherits from, and follows the conventions of, Rose::HTML::Object. Inherited methods that are not overridden will not be documented a second time here. See the Rose::HTML::Object documentation for more information..

Requirements: No special requirements
Platforms: Linux
Keyword: Base Base Class Form Html Form Libraries Object Params Person Phone Programming Rosehtmlform
Users rating: 0/10

License: Freeware Size: 102.4 KB
ROSE::HTML::FORM RELATED
Libraries  -  PHP HTML Form Generation and Validation Class 1.0 Beta 3
PHP HTML Form Generation and Validation Class is a PHP class for easy HTML form generation and validation. If youre a web developer you know that designing HTML forms and writing the PHP code for their validation is a really dull task. And if...
133.12 KB  
Nature  -  Html Form Filler 1.07
Html Form Filler is a useful form fill software.It will help you fill any html form easily and quickly. By every menu item in the ie right button menu you can fill every fill item.One ie menu item fill one form item. Operation is very...
1.12 MB  
Miscellaneous  -  MyLib PHP 1.0
MyLib PHP is a project that implements wrappers for db access (mysql, postgres, odbc, others), html wrappers, and html form.
 
Libraries  -  XML::SAX::Base 1.02
XML::SAX::Base is a base Perl class with SAX Drivers and Filters. SYNOPSIS package MyFilter; use XML::SAX::Base; @ISA = (XML::SAX::Base); This module has a very simple task - to be a base class for PerlSAX drivers and filters. Its default...
20.48 KB  
Libraries  -  HTML::FormHighlight 0.03
HTML::FormHighlight Perl module can help you to highlights fields in an HTML form. SYNOPSIS use HTML::FormHighlight; my $h = new HTML::FormHighlight; print $h->highlight( scalarref => $form, fields => [ A, B, C ], ); print...
5.12 KB  
Web Browser Tools  -  Resizeable Form Fields 0.2.1
Resizeable Form Fields is an extension which allows you to resize HTML form fields, including textareas, select boxes and more. Resize HTML form fields, including textareas, select boxes, text fields, and iframes..
4.1 KB  
Modules  -  login form for STS 1.0
It uses html form to pass email address and password to the login.php file to process. You can also use CSS to define styling of this login form to match your store.
 
Form Processors  -  PHP Form Extension Project 0.6.1
PHP Form Extension Project provides HTML form handling functions as PHP module. There are many form classes/functions implemented as PHP script. However, they are not fast enough or lack features. This project aims to provide HTML form handling...
 
E-Mail Tools  -  eformmail 2.0
eformmail project is a stand-alone CGI program that accepts an HTML form and emails it. The target email address is not buried in the HTML form, making it impossible for spammers to take advantage of this email address. The output can be...
75.78 KB  
Specialized Tools  -  Contact Form Generator 1.7
Create HTML forms for your website. Generate them with an online wizard. Contact forms are very useful to receive message from your visitors. Build polls, questionnaires, and other types of web forms. No programming skills are required, just copy...
641 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB