cvs: peardoc /en/package/html/html-form examples.xml intro.xml

From: Date: Tue, 22 Jul 2003 18:45:52 +0000
Subject: cvs: peardoc /en/package/html/html-form examples.xml intro.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-1095@lists.php.net to get a copy of this message
mj Tue Jul 22 14:45:52 2003 EDT Modified files: /peardoc/en/package/html/html-form examples.xml intro.xml Log: * Adding some more documentation Index: peardoc/en/package/html/html-form/examples.xml diff -u peardoc/en/package/html/html-form/examples.xml:1.1 peardoc/en/package/html/html-form/examples.xml:1.2 --- peardoc/en/package/html/html-form/examples.xml:1.1 Tue Jul 22 03:15:32 2003 +++ peardoc/en/package/html/html-form/examples.xml Tue Jul 22 14:45:52 2003 @@ -1,5 +1,12 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-form.examples"> + <docinfo> + <author> + <firstname>Martin</firstname> + <surname>Jansen</surname> + </author> + </docinfo> + <refnamediv> <refname>Usage examples</refname> <refpurpose>Using HTML_Form.</refpurpose> @@ -76,6 +83,38 @@ </para> </refsect1> + + <refsect1> + <title>Returing single form tags</title> + + <para> + Similar to displaying form tags with the <function>display*</function> + functions <classname>HTML_Form</classname> can also return the + tag instead of printing it. + </para> + + <example> + <title>Returning form tags</title> + + <programlisting role="php"> +<![CDATA[ +require_once "HTML/Form.php"; + +$form = new HTML_Form($_SERVER['PHP_SELF']); + +$str = $form->returnPassword("password", "Choose a password"); +]]> + </programlisting> + </example> + + <para> + The variable <varname>$str</varname> now contains + <acronym>HTML</acronym> markup like + <literal>&lt;input type="password" name="password" /&gt;</literal>. + </para> + + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: Index: peardoc/en/package/html/html-form/intro.xml diff -u peardoc/en/package/html/html-form/intro.xml:1.1 peardoc/en/package/html/html-form/intro.xml:1.2 --- peardoc/en/package/html/html-form/intro.xml:1.1 Tue Jul 22 03:15:32 2003 +++ peardoc/en/package/html/html-form/intro.xml Tue Jul 22 14:45:52 2003 @@ -1,5 +1,12 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-form.intro"> + <docinfo> + <author> + <firstname>Martin</firstname> + <surname>Jansen</surname> + </author> + </docinfo> + <refnamediv> <refname>Introduction to <classname>HTML_Form</classname></refname> <refpurpose>Generating <acronym>HTML</acronym> forms.</refpurpose> @@ -16,6 +23,25 @@ with a fixed layout. </para> + <refsect2 id="package.html.html-form.intro.whatis.range"> + <title>Range of use</title> + + <para> + Generally one can use <classname>HTML_Form</classname> in + <acronym>HTML</acronym> based projects of any form. But especially + when using the package in <quote>table mode</quote> one may soon + run into design problems, because the table that is created by + <classname>HTML_Form</classname> cannot be equipped with + <acronym>CSS</acronym> or other ways to control their look. Thus + the main usage area of <classname>HTML_Form</classname> are sites + where design does not play the most important role but where it + is necessary to get fast results while keeping the code clean at + the same time. (Examples are back office websites or places like + <ulink url="http://pear.php.net/">pear.php.net</ulink>, where + the package is used at a lot of places. + </para> + </refsect2> + <refsect2 id="package.html.html-form.intro.whatis.example"> <title>Simple usage example</title> @@ -44,7 +70,7 @@ </para> </refsect2> - <refsect2> + <refsect2 id="package.html.html-form.intro.whatis.tags"> <title>Supported tags</title> <para>

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