cvs: peardoc /en/package/html/html-quickform tutorial.xml /en/package/html/html-quickform-advmultiselect faq.xml /entities global.ent
| From: | Laurent Laville | Date: | Thu, 22 Jan 2009 16:42:09 +0000 |
| Subject: | cvs: peardoc /en/package/html/html-quickform tutorial.xml /en/package/html/html-quickform-advmultiselect faq.xml /entities global.ent | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-11471@lists.php.net to get a copy of this message | ||
farell Thu Jan 22 16:42:09 2009 UTC
Modified files:
/peardoc/en/package/html/html-quickform-advmultiselect faq.xml
/peardoc/en/package/html/html-quickform tutorial.xml
/peardoc/entities global.ent
Log:
replace the hard-coded web-archive link to big HTML_Quickform tutorial by entity
url.html_quickform.tutorial1
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/faq.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/package/html/html-quickform-advmultiselect/faq.xml diff -u peardoc/en/package/html/html-quickform-advmultiselect/faq.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/faq.xml:1.2 --- peardoc/en/package/html/html-quickform-advmultiselect/faq.xml:1.1 Thu Jan 22 15:02:11 2009 +++ peardoc/en/package/html/html-quickform-advmultiselect/faq.xml Thu Jan 22 16:42:08 2009 @@ -60,7 +60,7 @@ </para> <para> The purpose of - <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.midnighthax.com/quickform.php">Keith Edmunds</link> + <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.html_quickform.tutorial1;">Keith Edmunds</link> tutorial is to give the new users of QuickForm an overview of its features and usage patterns. It describes a small subset of available functionality. </para> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform/tutorial.xml?r1=1.7&r2=1.8&diff_format=u Index: peardoc/en/package/html/html-quickform/tutorial.xml diff -u peardoc/en/package/html/html-quickform/tutorial.xml:1.7 peardoc/en/package/html/html-quickform/tutorial.xml:1.8 --- peardoc/en/package/html/html-quickform/tutorial.xml:1.7 Sun Nov 2 17:34:17 2008 +++ peardoc/en/package/html/html-quickform/tutorial.xml Thu Jan 22 16:42:08 2009 @@ -5,20 +5,20 @@ <refpurpose>A tutorial for HTML_QuickForm</refpurpose> </refnamediv> <refsection xml:id="package.html.html-quickform.tutorial.purpose"><info><title>Introduction</title></info> - + <para> The purpose of this tutorial is to give the new users of QuickForm an overview of its features and usage -patterns. It describes a small subset of available functionality, but points to the parts of the -documentation that give a more in-depth overview. +patterns. It describes a small subset of available functionality, but points to the parts of the +documentation that give a more in-depth overview. </para> <para> -There also exists <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://web.archive.org/web/20080214041550/http://www.midnighthax.com/quickform.php">a somewhat bigger tutorial</link> on QuickForm usage made by Keith Edmunds. +There also exists <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.html_quickform.tutorial1;">a somewhat bigger tutorial</link> on QuickForm usage made by Keith Edmunds. </para> </refsection> <refsection xml:id="package.html.html-quickform.tutorial.firstform"><info><title>Your first form</title></info> - + <example><info><title>Basic QuickForm usage</title></info> - + <programlisting role="php"> <![CDATA[ // Load the main class @@ -41,7 +41,7 @@ $form->applyFilter('name', 'trim'); $form->addRule('name', 'Please enter your name', 'required', null, 'client'); -// Try to validate a form +// Try to validate a form if ($form->validate()) { echo '<h1>Hello, ' . htmlspecialchars($form->exportValue('name')) . '!</h1>'; exit; @@ -56,22 +56,22 @@ Lets review this example step by step. </para> <refsection xml:id="package.html.html-quickform.tutorial.firstform.building"><info><title>Building the form</title></info> - + <para> -The line +The line <programlisting role="php"> <![CDATA[ $form = new HTML_QuickForm('firstForm'); ]]> </programlisting> -creates a HTML_QuickForm object that will contain the objects representing elements and all the other -necessary information. We only pass the form's name to the <link linkend="package.html.html-quickform.html-quickform.html-quickform">constructor</link>, -which means that default values will be used for other parameters. In particular, the form's method will -default to <literal>POST</literal> and the form's action to the current file. When using QuickForm, it is +creates a HTML_QuickForm object that will contain the objects representing elements and all the other +necessary information. We only pass the form's name to the <link linkend="package.html.html-quickform.html-quickform.html-quickform">constructor</link>, +which means that default values will be used for other parameters. In particular, the form's method will +default to <literal>POST</literal> and the form's action to the current file. When using QuickForm, it is easier to keep all the form related logic in one file. </para> <para> -You might guess that +You might guess that <programlisting role="php"> <![CDATA[ $form->setDefaults(array( @@ -79,7 +79,7 @@ )); ]]> </programlisting> -sets the default value for <literal>name</literal> element to <literal>'Joe User'</literal>. QuickForm has the +sets the default value for <literal>name</literal> element to <literal>'Joe User'</literal>. QuickForm has the concept of default values (set via <link linkend="package.html.html-quickform.html-quickform.setdefaults"><function>setDefaults</function></link> method) and constant ones (set via <link linkend="package.html.html-quickform.html-quickform.setconstants"><function>setConstants</function></link>). The difference between them is that user's input overrides default values but not constant ones. @@ -93,14 +93,14 @@ $form->addElement('submit', null, 'Send'); ]]> </programlisting> -The first one is not the 'real' element, it is just a heading to improve presentation. The second one +The first one is not the 'real' element, it is just a heading to improve presentation. The second one actually is a text input box and the third is a submit button. Note that parameters for <link linkend="package.html.html-quickform.html-quickform.addelement"><function>addElement</function></link> -method have different meanings for different elements. That is so because they are actually passed to +method have different meanings for different elements. That is so because they are actually passed to these elements' constructors. </para> </refsection> <refsection xml:id="package.html.html-quickform.tutorial.firstform.checking"><info><title>Checking input</title></info> - + <para> The line <programlisting role="php"> @@ -110,8 +110,8 @@ </programlisting> defines a <link linkend="package.html.html-quickform.intro-validation.filters">filter</link> for the 'name' element value - the function that will be applied to it after form submit. In this case it is a builtin <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.php.lookup;trim"><function>trim</function></link> function, -but can be any valid <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.php.callback;"><type>callback</type></link>. Thus we will strip -all whitespace from the name, as we do not actually need it and as we want to be sure that a name was entered, +but can be any valid <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.php.callback;"><type>callback</type></link>. Thus we will strip +all whitespace from the name, as we do not actually need it and as we want to be sure that a name was entered, not just some spaces. </para> <para> @@ -121,13 +121,13 @@ $form->addRule('name', 'Please enter your name', 'required', null, 'client'); ]]> </programlisting> -This means that QuickForm will display an error message if the name was not entered. The -<literal>'client'</literal> modifier is here to switch on client-side JavaScript validation in addition to +This means that QuickForm will display an error message if the name was not entered. The +<literal>'client'</literal> modifier is here to switch on client-side JavaScript validation in addition to server-side one. Note also that QuickForm will automatically mark required fields in the form. </para> </refsection> <refsection xml:id="package.html.html-quickform.tutorial.firstform.processing"><info><title>Validating and processing</title></info> - + <para> We now have the form built and rules defined and need to decide whether to process it or display: <programlisting role="php"> @@ -138,7 +138,7 @@ ]]> </programlisting> The <link linkend="package.html.html-quickform.html-quickform.validate"><function>validate</function></link> method -will consider the form valid (i.e. return &true;) if some data was actually submitted and all the rules +will consider the form valid (i.e. return &true;) if some data was actually submitted and all the rules defined for the form were satisfied. In our case this means that 'name' element was not empty. </para> <para> @@ -155,7 +155,7 @@ methods may be of interest here. </para> <para> -The last line is pretty easy: +The last line is pretty easy: <programlisting role="php"> <![CDATA[ $form->display(); @@ -167,7 +167,7 @@ </refsection> </refsection> <refsection xml:id="package.html.html-quickform.tutorial.advanced"><info><title>Advanced features</title></info> - + <para> You now should have an understanding of basic QuickForm functionality, but there are many more features in the package, each of them deserving a separate tutorial. This section will give a short overview of them @@ -189,4 +189,4 @@ <link linkend="package.html.html-quickform.output.renderer-doc">renderers</link>. </para> </refsection> -</refentry> +</refentry> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/entities/global.ent?r1=1.9&r2=1.10&diff_format=u Index: peardoc/entities/global.ent diff -u peardoc/entities/global.ent:1.9 peardoc/entities/global.ent:1.10 --- peardoc/entities/global.ent:1.9 Thu Jan 22 09:37:58 2009 +++ peardoc/entities/global.ent Thu Jan 22 16:42:09 2009 @@ -1,6 +1,6 @@ <!-- -*- SGML -*- - $Id: global.ent,v 1.9 2009/01/22 09:37:58 farell Exp $ + $Id: global.ent,v 1.10 2009/01/22 16:42:09 farell Exp $ Contains global "macros" for all the XML documents. @@ -251,6 +251,9 @@ <!-- HTML_CSS --> <!ENTITY url.maxdesign "http://css.maxdesign.com.au/index.htm"> +<!-- HTML_QuickForm --> +<!ENTITY url.html_quickform.tutorial1 "http://www.midnighthax.com/quickform.php"> + <!-- HTML_QuickForm_Renderer_Tableless --> <!ENTITY url.html_quickform_renderer_tableless.tutorial1 "http://www.markwiesemann.eu/2006/12/27/howto-adding-explainations-next-to-form-fields-with-tableless-quickform-renderer"> <!ENTITY url.html_quickform_renderer_tableless.tutorial2 "http://www.markwiesemann.eu/2007/12/23/using-the-tableless-renderer-together-with-html_quickform_controller/">
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/faq.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/package/html/html-quickform-advmultiselect/faq.xml diff -u peardoc/en/package/html/html-quickform-advmultiselect/faq.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/faq.xml:1.2 --- peardoc/en/package/html/html-quickform-advmultiselect/faq.xml:1.1 Thu Jan 22 15:02:11 2009 +++ peardoc/en/package/html/html-quickform-advmultiselect/faq.xml Thu Jan 22 16:42:08 2009 @@ -60,7 +60,7 @@ </para> <para> The purpose of - <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.midnighthax.com/quickform.php">Keith Edmunds</link> + <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.html_quickform.tutorial1;">Keith Edmunds</link> tutorial is to give the new users of QuickForm an overview of its features and usage patterns. It describes a small subset of available functionality. </para> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform/tutorial.xml?r1=1.7&r2=1.8&diff_format=u Index: peardoc/en/package/html/html-quickform/tutorial.xml diff -u peardoc/en/package/html/html-quickform/tutorial.xml:1.7 peardoc/en/package/html/html-quickform/tutorial.xml:1.8 --- peardoc/en/package/html/html-quickform/tutorial.xml:1.7 Sun Nov 2 17:34:17 2008 +++ peardoc/en/package/html/html-quickform/tutorial.xml Thu Jan 22 16:42:08 2009 @@ -5,20 +5,20 @@ <refpurpose>A tutorial for HTML_QuickForm</refpurpose> </refnamediv> <refsection xml:id="package.html.html-quickform.tutorial.purpose"><info><title>Introduction</title></info> - + <para> The purpose of this tutorial is to give the new users of QuickForm an overview of its features and usage -patterns. It describes a small subset of available functionality, but points to the parts of the -documentation that give a more in-depth overview. +patterns. It describes a small subset of available functionality, but points to the parts of the +documentation that give a more in-depth overview. </para> <para> -There also exists <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://web.archive.org/web/20080214041550/http://www.midnighthax.com/quickform.php">a somewhat bigger tutorial</link> on QuickForm usage made by Keith Edmunds. +There also exists <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.html_quickform.tutorial1;">a somewhat bigger tutorial</link> on QuickForm usage made by Keith Edmunds. </para> </refsection> <refsection xml:id="package.html.html-quickform.tutorial.firstform"><info><title>Your first form</title></info> - + <example><info><title>Basic QuickForm usage</title></info> - + <programlisting role="php"> <![CDATA[ // Load the main class @@ -41,7 +41,7 @@ $form->applyFilter('name', 'trim'); $form->addRule('name', 'Please enter your name', 'required', null, 'client'); -// Try to validate a form +// Try to validate a form if ($form->validate()) { echo '<h1>Hello, ' . htmlspecialchars($form->exportValue('name')) . '!</h1>'; exit; @@ -56,22 +56,22 @@ Lets review this example step by step. </para> <refsection xml:id="package.html.html-quickform.tutorial.firstform.building"><info><title>Building the form</title></info> - + <para> -The line +The line <programlisting role="php"> <![CDATA[ $form = new HTML_QuickForm('firstForm'); ]]> </programlisting> -creates a HTML_QuickForm object that will contain the objects representing elements and all the other -necessary information. We only pass the form's name to the <link linkend="package.html.html-quickform.html-quickform.html-quickform">constructor</link>, -which means that default values will be used for other parameters. In particular, the form's method will -default to <literal>POST</literal> and the form's action to the current file. When using QuickForm, it is +creates a HTML_QuickForm object that will contain the objects representing elements and all the other +necessary information. We only pass the form's name to the <link linkend="package.html.html-quickform.html-quickform.html-quickform">constructor</link>, +which means that default values will be used for other parameters. In particular, the form's method will +default to <literal>POST</literal> and the form's action to the current file. When using QuickForm, it is easier to keep all the form related logic in one file. </para> <para> -You might guess that +You might guess that <programlisting role="php"> <![CDATA[ $form->setDefaults(array( @@ -79,7 +79,7 @@ )); ]]> </programlisting> -sets the default value for <literal>name</literal> element to <literal>'Joe User'</literal>. QuickForm has the +sets the default value for <literal>name</literal> element to <literal>'Joe User'</literal>. QuickForm has the concept of default values (set via <link linkend="package.html.html-quickform.html-quickform.setdefaults"><function>setDefaults</function></link> method) and constant ones (set via <link linkend="package.html.html-quickform.html-quickform.setconstants"><function>setConstants</function></link>). The difference between them is that user's input overrides default values but not constant ones. @@ -93,14 +93,14 @@ $form->addElement('submit', null, 'Send'); ]]> </programlisting> -The first one is not the 'real' element, it is just a heading to improve presentation. The second one +The first one is not the 'real' element, it is just a heading to improve presentation. The second one actually is a text input box and the third is a submit button. Note that parameters for <link linkend="package.html.html-quickform.html-quickform.addelement"><function>addElement</function></link> -method have different meanings for different elements. That is so because they are actually passed to +method have different meanings for different elements. That is so because they are actually passed to these elements' constructors. </para> </refsection> <refsection xml:id="package.html.html-quickform.tutorial.firstform.checking"><info><title>Checking input</title></info> - + <para> The line <programlisting role="php"> @@ -110,8 +110,8 @@ </programlisting> defines a <link linkend="package.html.html-quickform.intro-validation.filters">filter</link> for the 'name' element value - the function that will be applied to it after form submit. In this case it is a builtin <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.php.lookup;trim"><function>trim</function></link> function, -but can be any valid <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.php.callback;"><type>callback</type></link>. Thus we will strip -all whitespace from the name, as we do not actually need it and as we want to be sure that a name was entered, +but can be any valid <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.php.callback;"><type>callback</type></link>. Thus we will strip +all whitespace from the name, as we do not actually need it and as we want to be sure that a name was entered, not just some spaces. </para> <para> @@ -121,13 +121,13 @@ $form->addRule('name', 'Please enter your name', 'required', null, 'client'); ]]> </programlisting> -This means that QuickForm will display an error message if the name was not entered. The -<literal>'client'</literal> modifier is here to switch on client-side JavaScript validation in addition to +This means that QuickForm will display an error message if the name was not entered. The +<literal>'client'</literal> modifier is here to switch on client-side JavaScript validation in addition to server-side one. Note also that QuickForm will automatically mark required fields in the form. </para> </refsection> <refsection xml:id="package.html.html-quickform.tutorial.firstform.processing"><info><title>Validating and processing</title></info> - + <para> We now have the form built and rules defined and need to decide whether to process it or display: <programlisting role="php"> @@ -138,7 +138,7 @@ ]]> </programlisting> The <link linkend="package.html.html-quickform.html-quickform.validate"><function>validate</function></link> method -will consider the form valid (i.e. return &true;) if some data was actually submitted and all the rules +will consider the form valid (i.e. return &true;) if some data was actually submitted and all the rules defined for the form were satisfied. In our case this means that 'name' element was not empty. </para> <para> @@ -155,7 +155,7 @@ methods may be of interest here. </para> <para> -The last line is pretty easy: +The last line is pretty easy: <programlisting role="php"> <![CDATA[ $form->display(); @@ -167,7 +167,7 @@ </refsection> </refsection> <refsection xml:id="package.html.html-quickform.tutorial.advanced"><info><title>Advanced features</title></info> - + <para> You now should have an understanding of basic QuickForm functionality, but there are many more features in the package, each of them deserving a separate tutorial. This section will give a short overview of them @@ -189,4 +189,4 @@ <link linkend="package.html.html-quickform.output.renderer-doc">renderers</link>. </para> </refsection> -</refentry> +</refentry> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/entities/global.ent?r1=1.9&r2=1.10&diff_format=u Index: peardoc/entities/global.ent diff -u peardoc/entities/global.ent:1.9 peardoc/entities/global.ent:1.10 --- peardoc/entities/global.ent:1.9 Thu Jan 22 09:37:58 2009 +++ peardoc/entities/global.ent Thu Jan 22 16:42:09 2009 @@ -1,6 +1,6 @@ <!-- -*- SGML -*- - $Id: global.ent,v 1.9 2009/01/22 09:37:58 farell Exp $ + $Id: global.ent,v 1.10 2009/01/22 16:42:09 farell Exp $ Contains global "macros" for all the XML documents. @@ -251,6 +251,9 @@ <!-- HTML_CSS --> <!ENTITY url.maxdesign "http://css.maxdesign.com.au/index.htm"> +<!-- HTML_QuickForm --> +<!ENTITY url.html_quickform.tutorial1 "http://www.midnighthax.com/quickform.php"> + <!-- HTML_QuickForm_Renderer_Tableless --> <!ENTITY url.html_quickform_renderer_tableless.tutorial1 "http://www.markwiesemann.eu/2006/12/27/howto-adding-explainations-next-to-form-fields-with-tableless-quickform-renderer"> <!ENTITY url.html_quickform_renderer_tableless.tutorial2 "http://www.markwiesemann.eu/2007/12/23/using-the-tableless-renderer-together-with-html_quickform_controller/">