[cvs] [Wiki] changed: Project/HordeForm

Wiki Guest wikiguest at horde.org
Mon Apr 26 07:18:52 UTC 2010


guest [208.75.10.42]  Mon, 26 Apr 2010 03:18:52 -0400

Modified page: http://wiki.horde.org/Project/HordeForm
New Revision:  17.8
Change log:  EXTERNAL LINKS

@@ -439,9 +439,9 @@
  $g->select = array('name' => 'aSelect', 'options' => array(...));

  // or
  $g->text(array('name' => 'aText', 'size' => 50))
-          ->validate['regex'] =  '/\w+/';
+          ->validate['regex'] =  '/w+/';
  $g->select(array('name' => 'aSelect', 'options' => array())
  $select = $g->select['aSelect']; // or $form->select['aSelect'];
  $select->options['another'] = 1;
  $select->validate['custom'] = 'is_numeric';
@@ -454,9 +454,9 @@
  $form = new HTML_Quickform2('/path/to/action.php', 'method' => 'post');
  $form->addGroup('mygroup');
  $form->addElement('text', 'aText', array('size' => 50, 'default' =>
  'whatever', 'group' => 'mygroup')
-    ->validate('regex', '/\w+/');
+    ->validate('regex', '/w+/');
  $sel = $form->addElement('select', 'aSelect', array(...));
  $sel->addOption('another', 1);
  $sel->validate('custom', 'is_numeric');
  ?>
@@ -526,9 +526,9 @@

  Le 16 avr. 07 ? 18:31, Gregory Beaver a Ècrit :

  > $g->text(array('name' => 'aText', 'size' => 50))
->           ->validate['regex'] =  '/\w+/';
+>           ->validate['regex'] =  '/w+/';
  > $g->select(array('name' => 'aSelect', 'options' => array())
  > $select = $g->select['aSelect']; // or $form->select['aSelect'];
  > $select->options['another'] = 1;
  > $select->validate['custom'] = 'is_numeric';
@@ -668,9 +668,9 @@
  $g->select = array('name' => 'aSelect', 'options' => array(...));

  // or
  $g->text(array('name' => 'aText', 'size' => 50))
-         ->validate['regex'] =  '/\w+/';
+         ->validate['regex'] =  '/w+/';
  $g->select(array('name' => 'aSelect', 'options' => array())
  $select = $g->select['aSelect']; // or $form->select['aSelect'];
  $select->options['another'] = 1;
  $select->validate['custom'] = 'is_numeric';
@@ -859,9 +859,9 @@
  $g->select = array('name' => 'aSelect', 'options' => array(...));

  // or
  $g->text(array('name' => 'aText', 'size' => 50))
-         ->validate['regex'] =  '/\w+/';
+         ->validate['regex'] =  '/w+/';
  $g->select(array('name' => 'aSelect', 'options' => array())
  $select = $g->select['aSelect']; // or $form->select['aSelect'];
  $select->options['another'] = 1;
  $select->validate['custom'] = 'is_numeric';
@@ -874,9 +874,9 @@
  $form = new HTML_Quickform2('/path/to/action.php', 'method' => 'post');
  $form->addGroup('mygroup');
  $form->addElement('text', 'aText', array('size' => 50, 'default' =>
  'whatever', 'group' => 'mygroup')
-   ->validate('regex', '/\w+/');
+   ->validate('regex', '/w+/');
  $sel = $form->addElement('select', 'aSelect', array(...));
  $sel->addOption('another', 1);
  $sel->validate('custom', 'is_numeric');
  ?>
@@ -930,4 +930,8 @@
  from building it with method calls - except you have the added step of
  parsing the array.

  Separating logic from view is irrelevant to my suggestion.   
Quickform 1.x used renderers to do this, I suppose Quickform2 will  
have some facility as well.
+
+
+Other helpful site:
+[http://www.cheappoolproducts.com/Swimming~Pool~Safety~Equipment_43~supplies.html Pool  
Safety]



More information about the cvs mailing list