cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid fill.xml
| From: | Olivier Guilyardi | Date: | Thu, 29 Jun 2006 22:43:58 +0000 |
| Subject: | cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid fill.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-8099@lists.php.net to get a copy of this message | ||
olivierg Thu Jun 29 22:43:58 2006 UTC
Modified files:
/peardoc/en/package/structures/structures-datagrid/structures-datagrid
fill.xml
Log:
fix Request #7969 'Documentation for using my own form container'
http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml?r1=1.8&r2=1.9&diff_format=u
Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml
diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.8
peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.9
--- peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.8 Thu Jun 29
16:43:36 2006
+++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml Thu Jun 29
22:43:58 2006
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry id="package.structures.structures-datagrid.structures-datagrid.fill">
<refnamediv>
<refname><function>Structures_DataGrid::fill</function></refname>
@@ -108,6 +108,29 @@
17 ?>
</programlisting>
</example></para>
+ <para><example><title>Fill a form with sort
fields</title><programlisting role="php-highlighted">1 <?php
+2 require_once 'HTML/QuickForm.php';
+3
+4 // Create an empty form with your settings
+5 $form = new HTML_QuickForm('myForm', 'POST');
+6
+7 // Customize it, add a header, text field, etc..
+8 $form->addElement('header', null, 'Search & Sort
Form Example');
+9 $form->addElement('text', 'my_search',
'Search for:');
+10
+11 // Let the datagrid add sort fields, radio style
+12 $options = array('directionStyle' => 'radio');
+13 $datagrid-><link
linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($form,
$options);
+14
+15 // You must add a submit button. fill() never does this
+16 $form->addElement('submit', null, 'Submit');
+17
+18 // Use the native HTML_QuickForm::display() to print your form
+19 $form->display();
+20
+21 ?>
+</programlisting>
+</example></para>
</refsect1>
<refsect1
id="package.structures.structures-datagrid.structures-datagrid.fill.note">
&title.note;