cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid fill.xml

From: 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 ?&gt; </programlisting> </example></para> + <para><example><title>Fill a form with sort fields</title><programlisting role="php-highlighted">1 &lt;?php +2 require_once &apos;HTML/QuickForm.php&apos;; +3 +4 // Create an empty form with your settings +5 $form = new HTML_QuickForm(&apos;myForm&apos;, &apos;POST&apos;); +6 +7 // Customize it, add a header, text field, etc.. +8 $form-&gt;addElement(&apos;header&apos;, null, &apos;Search &amp; Sort Form Example&apos;); +9 $form-&gt;addElement(&apos;text&apos;, &apos;my_search&apos;, &apos;Search for:&apos;); +10 +11 // Let the datagrid add sort fields, radio style +12 $options = array(&apos;directionStyle&apos; =&gt; &apos;radio&apos;); +13 $datagrid-&gt;<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-&gt;addElement(&apos;submit&apos;, null, &apos;Submit&apos;); +17 +18 // Use the native HTML_QuickForm::display() to print your form +19 $form-&gt;display(); +20 +21 ?&gt; +</programlisting> +</example></para> </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.fill.note"> &title.note;

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