cvs: peardoc /en/package/html/html-quickform-advmultiselect/appendix examples-custom1.xml
| From: | Laurent Laville | Date: | Thu, 29 Jan 2009 21:18:44 +0000 |
| Subject: | cvs: peardoc /en/package/html/html-quickform-advmultiselect/appendix examples-custom1.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-11516@lists.php.net to get a copy of this message | ||
farell Thu Jan 29 21:18:44 2009 UTC
Modified files:
/peardoc/en/package/html/html-quickform-advmultiselect/appendix
examples-custom1.xml
Log:
sync with qfams_custom_1.php,v 1.6
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml?r1=1.2&r2=1.3&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml:1.2
peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml:1.3
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml:1.2 Wed Jan
28 22:25:14 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml Thu Jan 29
21:18:44 2009
@@ -48,7 +48,7 @@
* The template allows to add label as headers of dual select box
* and moves the button to another location (below each select box).
*
- * @version $Id: examples-custom1.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
+ * @version $Id: examples-custom1.xml,v 1.3 2009/01/29 21:18:44 farell Exp $
* @author Laurent Laville <pear@laurent-laville.org>
* @package HTML_QuickForm_advmultiselect
* @subpackage Examples
@@ -65,6 +65,23 @@
$form = new HTML_QuickForm('amsCustom1');
$form->removeAttribute('name'); // XHTML compliance
+// same as default element template but without the label (in first td cell)
+$withoutLabel = <<<_HTML
+<tr valign="top">
+ <td align="right">
+
+ </td>
+ <td align="left">
+ <!-- BEGIN error --><span style="color:
#ff0000;">{error}</span><br /><!-- END error -->{element}
+ </td>
+</tr>
+_HTML;
+
+// more XHTML compliant
+// replace default element template with label, because submit button have no label
+$renderer =& $form->defaultRenderer();
+$renderer->setElementTemplate($withoutLabel, 'send');
+
$fruit_array = array(
'apple' => 'Apple',
'orange' => 'Orange',