cvs: peardoc /ja/package/html html-quickform.xml /ja/package/html/html-quickform tutorial.xml

From: Date: Wed, 13 Oct 2004 10:39:43 +0000
Subject: cvs: peardoc /ja/package/html html-quickform.xml /ja/package/html/html-quickform tutorial.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4958@lists.php.net to get a copy of this message
haruki Wed Oct 13 06:39:43 2004 EDT Added files: /peardoc/ja/package/html html-quickform.xml /peardoc/ja/package/html/html-quickform tutorial.xml Log: new to Ja

http://cvs.php.net/co.php/peardoc/ja/package/html/html-quickform.xml?r=1.1&p=1 Index: peardoc/ja/package/html/html-quickform.xml +++ peardoc/ja/package/html/html-quickform.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.20 Maintainer: haruki Status: ready --> <sect1 id="package.html.html-quickform"> <title>HTML_QuickForm</title> <para> PEAR::HTML_QuickForm パッケージは、HTML フォームの生成、検証および処理を行うメソッドを提供します。 </para> <sect2 id="package.html.html-quickform.introduction"> <title>イントロダクション</title> <para> HTML_QuickForm は、HTML フォームを便利に扱うためのライブラリです。 Javascript もしくはサーバサイドでの検証を行えますし、 いろいろな方法でカスタマイズや拡張が可能です。 HTML_QuickForm は、複数のファイルから構成されています。 中心となるファイルは、<filename class="directory">pear/HTML</filename> ディレクトリにインストールされた <filename>QuickForm.php</filename> です。 他に重要なファイルとしては、フォーム要素に関連したメソッドが記述された <filename>element.php</filename> ファイルや、要素グループを扱うメソッドが書かれた <filename>group.php</filename> ファイルが挙げられます。どちらも、他のオブジェクトと同様に、 <filename class="directory">HTML/QuickForm</filename> ディレクトリにあります。 <filename>input.php</filename> には、(text, password 等の) 入力可能なタイプのすべての要素の 共通クラスが記述されています。HTML_QuickForm には、select, text, password, checkbox, file, submit, reset, button, image, radio, hidden, textarea といった 標準的なフォーム要素のそれぞれに対応するオブジェクトが定義されています。 さらに、APIを合致させれば、独自の要素を作ることも可能です。 </para> &package.html.html-quickform.tutorial; &package.html.html-quickform.intro-faq; &package.html.html-quickform.intro-elements; &package.html.html-quickform.intro-migration32; </sect2> <sect2 id="package.html.html-quickform.basic-form"> <title>基本的なフォームの生成</title> <para> To be written. </para> &package.html.html-quickform.html-quickform.html-quickform; &package.html.html-quickform.html-quickform.addelement; &package.html.html-quickform.html-quickform.apiversion; &package.html.html-quickform.html-quickform.createelement; &package.html.html-quickform.html-quickform.elementexists; &package.html.html-quickform.html-quickform.errormessage; &package.html.html-quickform.html-quickform.getelementtype; &package.html.html-quickform.html-quickform.getelement; &package.html.html-quickform.html-quickform.getmaxfilesize; &package.html.html-quickform.html-quickform.getregisteredtypes; &package.html.html-quickform.html-quickform.iserror; &package.html.html-quickform.html-quickform.istyperegistered; &package.html.html-quickform.html-quickform.registerelementtype; &package.html.html-quickform.html-quickform.removeelement; &package.html.html-quickform.html-quickform.setmaxfilesize; &package.html.html-quickform.html-quickform.updateelementattr; </sect2> <sect2 id="package.html.html-quickform.elements"> <title>フォーム要素を表現したクラス群</title> <para> To be written </para> <sect3 id="package.html.html-quickform.elements.base"> <title>Base classes</title> &package.html.html-quickform.html-quickform-element; &package.html.html-quickform.html-quickform-element.html-quickform-element; &package.html.html-quickform.html-quickform-element.accept; &package.html.html-quickform.html-quickform-element.apiversion; &package.html.html-quickform.html-quickform-element.exportvalue; &package.html.html-quickform.html-quickform-element.freeze; &package.html.html-quickform.html-quickform-element.getfrozenhtml; &package.html.html-quickform.html-quickform-element.getlabel; &package.html.html-quickform.html-quickform-element.getname; &package.html.html-quickform.html-quickform-element.gettype; &package.html.html-quickform.html-quickform-element.getvalue; &package.html.html-quickform.html-quickform-element.isfrozen; &package.html.html-quickform.html-quickform-element.onquickformevent; &package.html.html-quickform.html-quickform-element.setlabel; &package.html.html-quickform.html-quickform-element.setname; &package.html.html-quickform.html-quickform-element.setpersistantfreeze; &package.html.html-quickform.html-quickform-element.setvalue; &package.html.html-quickform.html-quickform-input; &package.html.html-quickform.html-quickform-input.html-quickform-input; &package.html.html-quickform.html-quickform-input.settype; </sect3> <sect3 id="package.html.html-quickform.elements.standard"> <title>標準的 HTML 要素</title> &package.html.html-quickform.html-quickform-button; &package.html.html-quickform.html-quickform-button.html-quickform-button; &package.html.html-quickform.html-quickform-checkbox; &package.html.html-quickform.html-quickform-checkbox.html-quickform-checkbox; &package.html.html-quickform.html-quickform-checkbox.getchecked; &package.html.html-quickform.html-quickform-checkbox.gettext; &package.html.html-quickform.html-quickform-checkbox.setchecked; &package.html.html-quickform.html-quickform-checkbox.settext; &package.html.html-quickform.html-quickform-file; &package.html.html-quickform.html-quickform-file.html-quickform-file; &package.html.html-quickform.html-quickform-file.getsize; &package.html.html-quickform.html-quickform-file.getvalue; &package.html.html-quickform.html-quickform-file.isuploadedfile; &package.html.html-quickform.html-quickform-file.moveuploadedfile; &package.html.html-quickform.html-quickform-file.setsize; &package.html.html-quickform.html-quickform-hidden; &package.html.html-quickform.html-quickform-hidden.html-quickform-hidden; &package.html.html-quickform.html-quickform-image; &package.html.html-quickform.html-quickform-image.html-quickform-image; &package.html.html-quickform.html-quickform-image.setalign; &package.html.html-quickform.html-quickform-image.setborder; &package.html.html-quickform.html-quickform-image.setsource; &package.html.html-quickform.html-quickform-password; &package.html.html-quickform.html-quickform-password.html-quickform-password; &package.html.html-quickform.html-quickform-password.setmaxlength; &package.html.html-quickform.html-quickform-password.setsize; &package.html.html-quickform.html-quickform-radio; &package.html.html-quickform.html-quickform-radio.html-quickform-radio; &package.html.html-quickform.html-quickform-radio.getchecked; &package.html.html-quickform.html-quickform-radio.gettext; &package.html.html-quickform.html-quickform-radio.setchecked; &package.html.html-quickform.html-quickform-radio.settext; &package.html.html-quickform.html-quickform-reset; &package.html.html-quickform.html-quickform-reset.html-quickform-reset; &package.html.html-quickform.html-quickform-select; &package.html.html-quickform.html-quickform-select.html-quickform-select; &package.html.html-quickform.html-quickform-select.addoption; &package.html.html-quickform.html-quickform-select.getmultiple; &package.html.html-quickform.html-quickform-select.getprivatename; &package.html.html-quickform.html-quickform-select.getselected; &package.html.html-quickform.html-quickform-select.getsize; &package.html.html-quickform.html-quickform-select.load; &package.html.html-quickform.html-quickform-select.loadarray; &package.html.html-quickform.html-quickform-select.loaddbresult; &package.html.html-quickform.html-quickform-select.loadquery; &package.html.html-quickform.html-quickform-select.setmultiple; &package.html.html-quickform.html-quickform-select.setselected; &package.html.html-quickform.html-quickform-select.setsize; &package.html.html-quickform.html-quickform-submit; &package.html.html-quickform.html-quickform-submit.html-quickform-submit; &package.html.html-quickform.html-quickform-text; &package.html.html-quickform.html-quickform-text.html-quickform-text; &package.html.html-quickform.html-quickform-text.setmaxlength; &package.html.html-quickform.html-quickform-text.setsize; &package.html.html-quickform.html-quickform-textarea; &package.html.html-quickform.html-quickform-textarea.html-quickform-textarea; &package.html.html-quickform.html-quickform-textarea.setcols; &package.html.html-quickform.html-quickform-textarea.setrows; &package.html.html-quickform.html-quickform-textarea.setwrap; </sect3> <sect3 id="package.html.html-quickform.elements.custom"> <title>カスタム要素</title> &package.html.html-quickform.html-quickform-advcheckbox; &package.html.html-quickform.html-quickform-advcheckbox.html-quickform-advcheckbox; &package.html.html-quickform.html-quickform-advcheckbox.getonclickjs; &package.html.html-quickform.html-quickform-advcheckbox.getprivatename; &package.html.html-quickform.html-quickform-advcheckbox.setvalues; &package.html.html-quickform.html-quickform-autocomplete; &package.html.html-quickform.html-quickform-autocomplete.html-quickform-autocomplete; &package.html.html-quickform.html-quickform-autocomplete.setoptions; &package.html.html-quickform.html-quickform-date; &package.html.html-quickform.html-quickform-date.html-quickform-date; &package.html.html-quickform.html-quickform-header; &package.html.html-quickform.html-quickform-header.html-quickform-header; &package.html.html-quickform.html-quickform-hiddenselect; &package.html.html-quickform.html-quickform-hiddenselect.html-quickform-hiddenselect; &package.html.html-quickform.html-quickform-hierselect; &package.html.html-quickform.html-quickform-hierselect.html-quickform-hierselect; &package.html.html-quickform.html-quickform-hierselect.setmainoptions; &package.html.html-quickform.html-quickform-hierselect.setsecoptions; &package.html.html-quickform.html-quickform-html; &package.html.html-quickform.html-quickform-html.html-quickform-html; &package.html.html-quickform.html-quickform-link; &package.html.html-quickform.html-quickform-link.html-quickform-link; &package.html.html-quickform.html-quickform-link.sethref; &package.html.html-quickform.html-quickform-static; &package.html.html-quickform.html-quickform-static.html-quickform-static; &package.html.html-quickform.html-quickform-static.settext; </sect3> </sect2> <sect2 id="package.html.html-quickform.groups"> <title>グループの使用</title> <para> To be written. </para> &package.html.html-quickform.html-quickform.addgroup; &package.html.html-quickform.html-quickform-group; &package.html.html-quickform.html-quickform-group.html-quickform-group; &package.html.html-quickform.html-quickform-group.getelementname; &package.html.html-quickform.html-quickform-group.getelements; &package.html.html-quickform.html-quickform-group.getgrouptype; &package.html.html-quickform.html-quickform-group.setelements; </sect2> <sect2 id="package.html.html-quickform.values"> <title>要素値の処理</title> <para> 各要素の値を管理し、入力された値を処理するメソッドです。 </para> <sect3 id="package.html.html-quickform.values.getting-setting"> <title>要素値の取得、設定および処理</title> &package.html.html-quickform.html-quickform.setconstants; &package.html.html-quickform.html-quickform.setdefaults; &package.html.html-quickform.html-quickform.exportvalue; &package.html.html-quickform.html-quickform.exportvalues; &package.html.html-quickform.html-quickform.getelementvalue; &package.html.html-quickform.html-quickform.getsubmitvalue; &package.html.html-quickform.html-quickform.getsubmitvalues; &package.html.html-quickform.html-quickform.process; </sect3> <sect3 id="package.html.html-quickform.values.validation"> <title>検証およびフィルタ</title> <para> HTML_QuickForm は、「検証ルール」をサポートしています。 自らの検証ルールを書き、QuickForm に登録した後、自身のスクリプトからコールします。 デフォルトでは、正規表現による検証(<ulink url="&url.php.lookup;preg-match">preg_match</ulink> 形式) が、検証が要求された要素についてのみ行われます。 また、クライアント側での検証を行いたい場合は、必要な javascript コードが生成されます。 サーバ側での検証は(デフォルトでは)常に行われます。 </para> <para> フォームへのデータのインポートや、送信されたフォームの処理に際して、フィルタを利用することができます。 フィルタは、時前に登録の必要がないことを除き、検証ルールと同様に動作します。 フィルタ関数を書き、スクリプトからコールします。 (trim, addslashes, htmlentities, などの) すべての PHP 関数が使用できますし、要素値へ再帰的に適用されます。 </para> &package.html.html-quickform.intro-validation; &package.html.html-quickform.html-quickform.addrule; &package.html.html-quickform.html-quickform.addgrouprule; &package.html.html-quickform.html-quickform.addformrule; &package.html.html-quickform.html-quickform.iselementrequired; &package.html.html-quickform.html-quickform.validate; &package.html.html-quickform.html-quickform.getelementerror; &package.html.html-quickform.html-quickform.setelementerror; &package.html.html-quickform.html-quickform.registerrule; &package.html.html-quickform.html-quickform.getregisteredrules; &package.html.html-quickform.html-quickform.isruleregistered; &package.html.html-quickform.html-quickform.applyfilter; </sect3> </sect2> <sect2 id="package.html.html-quickform.output"> <title>フォームの出力</title> <para> HTML_QuickForm は、いろいろな種類のレンダラの使用が可能ですので、 フォームの出力を様々にカスタマイズすることができます。 デフォルトのレンダラを使えば、各要素の属性値やエラーメッセージ・ヘッダ・必須入力欄の表示といった点を カスタマイズできますし、独自のレンダラを書くことも可能です。 </para> <sect3 id="package.html.html-quickform.output.form-customization"> <title>フォームのカスタマイズと出力ヘルパー</title> &package.html.html-quickform.html-quickform.freeze; &package.html.html-quickform.html-quickform.iselementfrozen; &package.html.html-quickform.html-quickform.isfrozen; &package.html.html-quickform.html-quickform.setrequirednote; &package.html.html-quickform.html-quickform.setjswarnings; &package.html.html-quickform.html-quickform.getrequirednote; &package.html.html-quickform.html-quickform.getvalidationscript; &package.html.html-quickform.html-quickform.accept; &package.html.html-quickform.html-quickform.defaultrenderer; &package.html.html-quickform.html-quickform.toarray; &package.html.html-quickform.html-quickform.tohtml; </sect3> <sect3 id="package.html.html-quickform.output.basic-renderers"> <title>基本的なレンダラ</title> <para> これらのレンダラは、バージョン3.0以前の <classname>HTML_QuickForm</classname> コードを 基礎としており、動作に他のクラスを必要としません。 </para> &package.html.html-quickform.intro-renderers; &package.html.html-quickform.html-quickform-renderer-default; &package.html.html-quickform.html-quickform-renderer-default.clearalltemplates; &package.html.html-quickform.html-quickform-renderer-default.setelementtemplate; &package.html.html-quickform.html-quickform-renderer-default.setformtemplate; &package.html.html-quickform.html-quickform-renderer-default.setgroupelementtemplate; &package.html.html-quickform.html-quickform-renderer-default.setgrouptemplate; &package.html.html-quickform.html-quickform-renderer-default.setheadertemplate; &package.html.html-quickform.html-quickform-renderer-default.setrequirednotetemplate; &package.html.html-quickform.html-quickform-renderer-default.tohtml; &package.html.html-quickform.html-quickform-renderer-array; &package.html.html-quickform.html-quickform-renderer-array.html-quickform-renderer-array; &package.html.html-quickform.html-quickform-renderer-array.setelementstyle; &package.html.html-quickform.html-quickform-renderer-array.toarray; </sect3> <sect3 id="package.html.html-quickform.output.template-renderers"> <title>テンプレートベースのレンダラ</title> <para> これらのレンダラは、フォームの HTML 出力の生成にテンプレートエンジンを使用します。 </para> &package.html.html-quickform.html-quickform-renderer-arraysmarty; &package.html.html-quickform.html-quickform-renderer-arraysmarty.html-quickform-renderer-arraysmarty; &package.html.html-quickform.html-quickform-renderer-arraysmarty.seterrortemplate; &package.html.html-quickform.html-quickform-renderer-arraysmarty.setrequiredtemplate; &package.html.html-quickform.html-quickform-renderer-itdynamic; &package.html.html-quickform.html-quickform-renderer-itdynamic.html-quickform-renderer-itdynamic; &package.html.html-quickform.html-quickform-renderer-itdynamic.setelementblock; &package.html.html-quickform.html-quickform-renderer-itdynamic.setheaderblock; &package.html.html-quickform.html-quickform-renderer-itstatic; &package.html.html-quickform.html-quickform-renderer-itstatic.html-quickform-renderer-itstatic; &package.html.html-quickform.html-quickform-renderer-itstatic.seterrortemplate; &package.html.html-quickform.html-quickform-renderer-itstatic.setrequiredtemplate; &package.html.html-quickform.html-quickform-renderer-quickhtml; &package.html.html-quickform.html-quickform-renderer-quickhtml.html-quickform-renderer-quickhtml; &package.html.html-quickform.html-quickform-renderer-quickhtml.tohtml; &package.html.html-quickform.html-quickform-renderer-quickhtml.elementtohtml; </sect3> <sect3 id="package.html.html-quickform.output.renderer-doc"> <title>レンダラのインフラストラクチャ</title> <para> 既存のレンダラを拡張したり、新しいレンダラを書く場合には、以下が参考となるでしょう。 </para> &package.html.html-quickform.html-quickform-renderer; &package.html.html-quickform.html-quickform-renderer.startform; &package.html.html-quickform.html-quickform-renderer.finishform; &package.html.html-quickform.html-quickform-renderer.startgroup; &package.html.html-quickform.html-quickform-renderer.finishgroup; &package.html.html-quickform.html-quickform-renderer.renderelement; &package.html.html-quickform.html-quickform-renderer.renderheader; &package.html.html-quickform.html-quickform-renderer.renderhidden; &package.html.html-quickform.html-quickform-renderer.renderhtml; </sect3> </sect2> </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/ja/package/html/html-quickform/tutorial.xml?r=1.1&p=1 Index: peardoc/ja/package/html/html-quickform/tutorial.xml +++ peardoc/ja/package/html/html-quickform/tutorial.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: haruki Status: partial --> <refentry id="package.html.html-quickform.tutorial"> <refnamediv> <refname>クイックスタートガイド</refname> <refpurpose>HTML_QuickForm チュートリアル</refpurpose> </refnamediv> <refsect1 id="package.html.html-quickform.tutorial.purpose"> <title>イントロダクション</title> <para> このチュートリアルは、QuickForm を初めて使うユーザに対して、 機能と使用法の概要を紹介するものです。 ここでは、利用できる機能の内のほんの一部だけについて解説しますが、 より広く深く知るために本マニュアルのどこを見れば良いかについても示していきます。 </para> <para> Keith Edmunds によって書かれた、QuickForm の使用法についての <ulink url="http://www.thelinuxconsultancy.co.uk/quickform.html">いくぶん長めのチュートリアル</ulink> も参考となるでしょう。 </para> </refsect1> <refsect1 id="package.html.html-quickform.tutorial.firstform"> <title>はじめてのフォーム</title> <example> <title>基本的な使用方法</title> <programlisting role="php"> <![CDATA[ // メインクラスの読み込み require_once 'HTML/QuickForm.php'; // HTML_QuickForm オブジェクトを生成 $form = new HTML_QuickForm('firstForm'); // フォーム要素のデフォルト値を設定 $form->setDefaults(array( 'name' => 'Joe User' )); // フォームに要素をいくつか追加 $form->addElement('header', null, 'QuickForm tutorial example'); $form->addElement('text', 'name', 'Enter your name:', array('size' => 50, 'maxlength' => 255)); $form->addElement('submit', null, 'Send'); // フィルタと検証ルールを追加 $form->applyFilter('name', 'trim'); $form->addRule('name', 'Please enter your name', 'required', null, 'client'); // フォームの妥当性検証 if ($form->validate()) { echo '<h1>Hello, ' . htmlspecialchars($form->exportValue('name')) . '!</h1>'; exit; } // フォームの出力 $form->display(); ]]> </programlisting> </example> <para> では、順を追って上記の例を検討して行きましょう。 </para> <refsect2 id="package.html.html-quickform.tutorial.firstform.building"> <title>フォームの構築</title> <para> <programlisting role="php"> <![CDATA[ $form = new HTML_QuickForm('firstForm'); ]]> </programlisting> の行で、HTML_QuickForm オブジェクトが生成されています。 後で、このHTML_QuickForm オブジェクトに、要素に対応したオブジェクトや他の必要な情報を加えていくこととなります。 ここで、<link linkend="package.html.html-quickform.html-quickform.html-quickform">コンストラクタ</link>には、 フォームの名称のみを渡し、他のパラメータはデフォルト値が使われています。 フォームの method 属性には <literal>POST</literal> が、action 属性には現在のファイル名となります。 When using QuickForm, it is easier to keep all the form related logic in one file. </para> <para> You might guess that <programlisting role="php"> <![CDATA[ $form->setDefaults(array( 'name' => 'Joe User' )); ]]> </programlisting> 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. </para> <para> Our form will consist of three elements: <programlisting role="php"> <![CDATA[ $form->addElement('header', null, 'QuickForm tutorial example'); $form->addElement('text', 'name', 'Enter your name:', array('size' => 50, 'maxlength' => 255)); $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 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 these elements' constructors. </para> </refsect2> <refsect2 id="package.html.html-quickform.tutorial.firstform.checking"> <title>Checking input</title> <para> The line <programlisting role="php"> <![CDATA[ $form->applyFilter('name', 'trim'); ]]> </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 <ulink url="&url.php.lookup;trim"><function>trim</function></ulink> function, but can be any valid <ulink url="&url.php.callback;"><type>callback</type></ulink>. 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> Next we define a <link linkend="package.html.html-quickform.intro-validation.rules">rule</link> for the name field: <programlisting role="php"> <![CDATA[ $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 server-side one. Note also that QuickForm will automatically mark required fields in the form. </para> </refsect2> <refsect2 id="package.html.html-quickform.tutorial.firstform.processing"> <title>Validating and processing</title> <para> We now have the form built and rules defined and need to decide whether to process it or display: <programlisting role="php"> <![CDATA[ if ($form->validate()) { // Do some stuff } ]]> </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 defined for the form were satisfied. In our case this means that 'name' element was not empty. </para> <para> If the form is validated we need to process the values <programlisting role="php"> <![CDATA[ echo '<h1>Hello, ' . htmlspecialchars($form->exportValue('name')) . '!</h1>'; exit; ]]> </programlisting> This is an example, in your scripts you'll usually want to store the values somewhere and to redirect to some other page to prevent a duplicate submit. The <link linkend="package.html.html-quickform.html-quickform.process"><function>process</function></link> and <link linkend="package.html.html-quickform.html-quickform.exportvalues"><function>exportvalues</function></link> methods may be of interest here. </para> <para> The last line is pretty easy: <programlisting role="php"> <![CDATA[ $form->display(); ]]> </programlisting> If the form is not valid, which means that it either was not yet submitted or that there were errors, it will be displayed. Error messages (if any) will be displayed near the corresponding elements. </para> </refsect2> </refsect1> <refsect1 id="package.html.html-quickform.tutorial.advanced"> <title>Advanced features</title> <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 and point you to the complete documentation. </para> <para> <link linkend="package.html.html-quickform.groups">Groups</link> allow to combine several individual elements into one entity and to use it as one element. This is also used to create pseudo-elements like date and hierselect. </para> <para> QuickForm offers a lot of possibilities to customize form layout and appearance. Form output is done via <link linkend="package.html.html-quickform.intro-renderers">renderers</link> - special classes containing necessary logic. There are renderers that <link linkend="package.html.html-quickform.html-quickform-renderer-default">directly output HTML</link> and those that <link linkend="package.html.html-quickform.output.template-renderers">use template engines</link> for this. </para> <para> And finally, you can extend QuickForm by adding your own element types, rules and <link linkend="package.html.html-quickform.output.renderer-doc">renderers</link>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#4958) next »