cvs: pear /HTML_QuickForm/docs QuickForm_example.php

From: Date: Sat, 11 Jan 2003 20:11:33 +0000
Subject: cvs: pear /HTML_QuickForm/docs QuickForm_example.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-8192@lists.php.net to get a copy of this message
mansion Sat Jan 11 15:11:33 2003 EDT Modified files: /pear/HTML_QuickForm/docs QuickForm_example.php Log: Added some examples of the date element. Now I will need to try to add some rules to see how it goes with it. Index: pear/HTML_QuickForm/docs/QuickForm_example.php diff -u pear/HTML_QuickForm/docs/QuickForm_example.php:1.7 pear/HTML_QuickForm/docs/QuickForm_example.php:1.8 --- pear/HTML_QuickForm/docs/QuickForm_example.php:1.7 Thu May 16 08:35:58 2002 +++ pear/HTML_QuickForm/docs/QuickForm_example.php Sat Jan 11 15:11:32 2003 @@ -19,7 +19,12 @@ $defaultValues['iradYesNo'] = 'Y'; $defaultValues['ichkABC'] = array('A'=>true,'B'=>true); $defaultValues['QFText'] = '153.5'; +$defaultValues['dateTest1'] = array('d'=>11, 'M'=>1, 'Y'=>2003); $form->setDefaults($defaultValues); + +$constantValues['dateTest3'] = time(); +$form->setconstants($constantValues); + // Elements will be displayed in the order they are declared $form->addHeader('Normal Elements'); // Classic form elements @@ -39,13 +44,21 @@ $select = &$form->getElement('iselTest'); $select->setSize(5); $select->setMultiple(true); + +$form->addHeader('Date Elements'); +// Date elements +$form->addElement('date', 'dateTest1', 'Date1:', array('format'=>'dmY', 'minYear'=>2000, 'maxYear'=>2004)); +$form->addElement('date', 'dateTest2', 'Date2:', array('format'=>'d-F-Y', 'language'=>'de')); +$form->addElement('date', 'dateTest3', 'Today is:', array('format'=>'l D d M Y')); + + $form->addHeader('Grouped Elements'); // Grouped elements $name['last'] = &HTML_QuickForm::createElement('text', 'last'); $name['last']->setSize(30); $name['first'] = &HTML_QuickForm::createElement('text', 'first'); $name['first']->setSize(20); -$form->addElementGroup($name, 'Name (last, first):', 'name', ',&nbsp'); +$form->addElementGroup($name, 'Name (last, first):', 'name', ', '); // Creates a group of text inputs $areaCode = &HTML_QuickForm::createElement('text', ''); $areaCode->setSize(3);

« previous php.pear.cvs (#8192) next »