Home
Accueil
Downloads
Téléchargements
Forums
Forums
Your Account
Votre compte
Menu
· Accueil ·

· Communication ·
  · Forums
  · Messages privés
  · Contactez nous
  · Recommendez nous
  · Sondages
  · Les projets

· Nouvelles ·Stats
  · Sujets
  · Ecrire un article
  · Articles archivés
  · Articles RSS
  · Lettre de sécurité
  · Archive de lettres

· Téléchargements ·
  · Accueil
  · Nouveautés
  · Mises à jour
  · Thêmes

· Outils ·
  · Outils divers
  · Convertisseur de temps
  · Table de caractères
  · Générateur de boutons
  · Compresseur Javascript

· Documentation ·
  · Wiki
  · Questions/Réponses
  · Documents
  · Manuel PHP-Nuke
  · Manuel PHP
  · Manuel PEAR
  · Encyclopédies

· Liens ·
  · Nos liens
  · Nos fluxs RSS
  · Partenaires
  · Votre publicité
  · Sitemap
  · Mes bannières

· Infos ·
  · Rechercher
  · Votre compte
  · Liste des membres
  · Carte des membres
  · Top

· Divers ·
  · Météo
  · Galeries
  · Statistiques Phpnuke
  · MS Analysis


HTML_QuickForm_DHTMLRulesTableless

HTML_QuickForm_DHTMLRulesTableless

HTML_QuickForm_DHTMLRulesTableless is a DHTML replacement for the standard JavaScript alert window for client-side validation of forms built with HTML_QuickForm when using the HTML_QuickForm_Renderer_Tableless renderer.

In addition to the standard behaviour of HTML_QuickForm (i.e. showing the errors from client-side validation on the "onSubmit" event), this package can also show the errors on the "onBlur" and "onChange" events (see below for information on how to enable this).

Usage

To use this package you just need to do something like this:

require_once 'HTML/QuickForm.php';
require_once 'HTML/QuickForm/DHTMLRulesTableless.php';
require_once 'HTML/QuickForm/Renderer/Tableless.php';

$form = new HTML_QuickForm_DHTMLRulesTableless(...);
$renderer = new HTML_QuickForm_Renderer_Tableless();

// usual code, e.g. new form fields, rules, ...

$form->accept($renderer);
echo $renderer->toHtml();

As already said for the tableless renderer, you need to add the following line to your code to get full XHTML validity:

$form->removeAttribute('name');

To enable validation on "onBlur" and "onChange" events, you need to add the following line before the $form->accept($renderer); call:

$form->getValidationScript();

Manuel PEAR pour PHP-Nuke © www.stefvar.com
Syndiquez notre contenu RSS, Atom, etc..
PHP-Nuke © 2007Reproduction interdite sans autorisation de ma part www.stefvar.com Copyright © 2008Thème iCGstation
Site français de la communauté PragmaMx