Bug #5154 [NEW]: Too few examples in QuickForm

From: Date: Fri, 19 Aug 2005 15:09:00 +0000
Subject: Bug #5154 [NEW]: Too few examples in QuickForm
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6681@lists.php.net to get a copy of this message
From: mdjones0978-php at yahoo dot com Operating system: XP/Linux (both) PHP version: 5.0.2 Package: Documentation Bug Type: Bug Bug description: Too few examples in QuickForm Description: ------------ I would love to see more samples in the documentation, and once I figure things out I would be more than happy to post them as comments like you can on the main PHP site. Code and Template are included below. Test script: --------------- $repeat = array(); $repeat[] = $form->addElement('radio', 'repeat', 'none', null, 'none'); $repeat[] = $form->addElement('radio', 'repeat', 'repeat', null, 'repeat'); $repeat[] = $form->addElement('radio', 'repeat', 'repeaton', null, 'reapeaton'); $form->addGroup($repeat, 'repeat', '', '<br />'); $form->addElement('select', 'repeatevery', '', array('Every' => 'Every', 'Every Other' => 'Every Other')); $form->addElement('select', 'repeateverywhat', '', array('Day' => 'Day', 'Week' => 'Week', 'Month' => 'Month', 'Year' => 'Year', 'MWF' => 'Mon, Wed, Fri', 'TuesThurs' => 'Tue &amp; Thu', 'Weekdays' => 'Mon Thru Fri', 'Weekends' => 'Sat &amp; Sun')); $enddate = array(); $enddate[] = $form->addElement('radio', 'ends', 'none', null, 'none'); $enddate[] = $form->addElement('radio', 'ends', 'endon', null, 'endon'); $form->addGroup($enddate, 'ends', '', '<br />'); $form->addElement('date', 'enddate', 'Date:', array('format' => 'F d, Y', 'minYear' => date('Y'), 'maxYear' => date('Y')+10, 'addEmptyOption' => true, 'emptyOptionText' => ' ')); Expected result: ---------------- <tr><th colspan="2">{$form.header.showtimes}</th></tr> <tr> <td class="label">{$form.newshowtime.label}</td> <td class="element">{$form.newshowtime.html}</td> </tr> <tr> <TD CLASS='label'>Repeating:</TD> <TD CLASS='element'> {$form.repeat.none.html}&nbsp;This event does not repeat <BR>{$form.repeat.repeat.html}&nbsp;Repeat {$form.repeatevery.html}&nbsp;{$form.repeateverywhat.html}</TD> </tr> <tr> <TD CLASS='label'>End Date:</TD> <TD CLASS='element'> {$form.ends.none.html}&nbsp;No End Date <BR>{$form.ends.endon.html}&nbsp;Repeat&nbsp;until&nbsp;{$form.enddate.html}</TD> </tr> -- Edit bug report at http://pear.php.net/bugs/bug.php?id=5154&edit=1 --

« previous php.pear.doc (#6681) next »