HTML::FormHighlight v.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 $h->highlight( scalarref => $form, fields => [ A, B, C ], highlight => *, mark => , all_in_group => 1, ), HTML::FormHighlight can be used to highlight fields in an HTML form. It uses HTML::Parser to parse the HTML form, and then places text somewhere before each field to highlight the field. You can specify which fields to highlight, and optionally supply a CGI object for it to check whether or not an input value exists before highlighting the field. It can be used when displaying forms where a user hasnt filled out a required field. The indicator can make it easier for a user to locate the fields that theyve missed. If youre interested in more advanced form validation, see HTML::FormValidator. HTML::FillInForm can also be used to fill form fields with values that have already been submitted. METHODS new() Create a new HTML::FormHighlight object. Example: $h = new HTML::FormHighlight, highlight() Parse through the HTML form and highlight fields. The method returns a scalar containing the parsed form. Here are a few examples: To highlight the fields A, B and C (form on disk): $h->highlight( file => form.html, fields => [ A, B, C ], ), To highlight the fields A and B with a smiley face (form as a scalar): $h->highlight( scalarref => $form, fields => [ A, B ], highlight =>, ), To highlight the fields A and B if they havent been supplied by form input (form as an array of lines): $q = new CGI, $h->highlight( arrayref => @form, fields => [ A, B ], fobject => $q, ), Note: highlight() will only highlight the first option in a radio or select group unless the all_in_group flag is set to a true value. Heres a list of possible parameters for highlight() and their descriptions: scalarref - a reference to a scalar that contains the text of the form. arrayref - a reference to an array of lines that contain the text of the form. file - a scalar that contains the file name where the form is kept. fields - a reference to an array that lists the fields to be highlighted. If used in conjunction with "fobject" or "fdat", only the fields listed that are empty will be highlighted. highlight - a scalar that contains the highlight indicator. Defaults to a red asterisk (*). mark - a regex specifying where to place the highlight indicator. If this is empty, the indicator will be inserted directly before the form field. The HTML form does not need to contain the text specified in the regex before each form field. highlight() will only use a mark for a field if there is no other form field before the field its highlighting. If there is more than one mark before a field, it will only highlight the last mark. If it doesnt find a mark, it will insert the indicator directly before the form field

HTML::FormHighlight Perl module can help you ...

  • HTML::FormHighlight
  • 0.03
  • Adekunle Olonoh
  • Any Platform
  • Perl Artistic
  • 5 Kb
  • 145

Review HTML::FormHighlight

  • captcha
New Components & Libraries software
  • DotConnect for SugarCRM  v.1.7dotConnect for SugarCRM is an ADO.NET provider for working with SugarCRM data through the standard ADO.NET or Entity Framework interfaces.
  • Mgosoft XPS Converter SDK  v.9.0.1Convert XPS files to PDF, PS format and dozens of image formats, such as TIFF, JPEG, PNG, BMP, PCX, GIF, WMF, EMF, TGA and so on, it retains the layout, images, text, line, ellipse, color, and formatting of the original XPS file.
  • SentiVeillance SDK Trial  v.6.0.178880Real-time biometric face recognition and pedestrian/vehicle tracking SDK for surveillance systems and networks. Supports up to 10 cameras on one PC. Automatic identification against watch list, gender/emotions detection. See: ...
  • DbForge Documenter for MySQL  v.1.1dbForge Documenter for MySQL is a handy MySQL and MariaDB documentation tool that automatically generates documentation of an entire MySQL database in HTML, PDF, and MARKDOWN file formats.
  • HTML/JavaScript/CSS Compressor  v.4.3A must have tool which makes your web pages load faster and protects your code from thieves. By compressing code we mean removing unnecessary spaces, returns, line feeds, comments etc. The size of your page reduces and the page loads much faster, ...
  • HTMLDOC  v. Basic provides HTML conversion services on a single PC or web server via command-line, GUI, and CGI applications. The GUI provides easy access to all of HTMLDOCs features, allowing you to quickly convert individual files or pages as well as ...