cvs: peardoc /en/package/html/html-quickform-advmultiselect/appendix examples-basic1.xml

[email protected] ("Laurent Laville")
Newsgroups php.pear.doc
Message-ID <cvsfarell1233264006@cvsserver>
farell		Thu Jan 29 21:20:06 2009 UTC

  Modified files:              
    /peardoc/en/package/html/html-quickform-advmultiselect/appendix	
                                                                   	examples-basic1.xml 
  Log:
  sync with qfams_basic_1.php,v 1.5
  
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml?r1=1.2&r2=1.3&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml:1.2 peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml:1.3
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml:1.2	Wed Jan 28 22:25:14 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml	Thu Jan 29 21:20:04 2009
@@ -29,7 +29,7 @@
  * Basic advMultiSelect HTML_QuickForm element
  * without any customization.
  *
- * @version    $Id: examples-basic1.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
+ * @version    $Id: examples-basic1.xml,v 1.3 2009/01/29 21:20:04 farell Exp $
  * @author     Laurent Laville <[email protected]>
  * @package    HTML_QuickForm_advmultiselect
  * @subpackage Examples
@@ -46,6 +46,23 @@
 $form = new HTML_QuickForm('amsBasic1');
 $form->removeAttribute('name');        // XHTML compliance
 
+// same as default element template but wihtout the label (in first td cell)
+$withoutLabel = <<<_HTML
+<tr valign="top">
+    <td align="right">
+        &nbsp;
+    </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');
+
 $car_array = array(
     'dodge'     =>  'Dodge',
     'chevy'     =>  'Chevy',
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.