Location: PHPKode > projects > Pieforms > pieforms-php5-0.2.2/doc/html/user/configuration.html
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns=http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<title>Pieforms Configuration</title>

<link rel="stylesheet" type="text/css" href="../style.css" />
</head>
<body>
<div class="document" id="pieforms-configuration">
<h1 class="title">Pieforms Configuration</h1>
<p><div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> &raquo; <a href="../">Documentation Home</a> &raquo; <a href="">Pieforms Configuration</a></div></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Author:</th><td class="field-body">Nigel McNie</td>
</tr>
<tr class="field"><th class="field-name">Contact:</th><td class="field-body"><a class="reference" href="mailto:nigel&#64;catalyst.net.nz">nigel&#64;catalyst.net.nz</a></td>
</tr>
<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">This document has been placed in the public domain</td>
</tr>
</tbody>
</table>
<div class="contents topic">
<p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
<ul class="simple">
<li><a class="reference" href="#requirements" id="id3" name="id3">Requirements</a></li>
<li><a class="reference" href="#installation" id="id4" name="id4">Installation</a></li>
<li><a class="reference" href="#using-pieforms-on-a-page" id="id5" name="id5">Using Pieforms on a Page</a></li>
<li><a class="reference" href="#configuration" id="id6" name="id6">Configuration</a><ul>
<li><a class="reference" href="#configuring-a-default-form" id="id7" name="id7">Configuring a Default Form</a></li>
<li><a class="reference" href="#validation-for-all-forms" id="id8" name="id8">Validation for All Forms</a></li>
<li><a class="reference" href="#configuring-elements" id="id9" name="id9">Configuring elements</a></li>
</ul>
</li>
</ul>
</div>
<p>This document describes how to install and configure Pieforms for use in your
application. Once you have completed the steps in this document, all of the
features of Pieforms will be available for your use.</p>
<div class="section">
<h1><a class="toc-backref" href="#id3" id="requirements" name="requirements">Requirements</a></h1>
<p>Currently, Pieforms is written for PHP5. Pieforms will not run in PHP4, however
it is planned that PHP4 support will be added as a separate tree. That way,
those people using PHP5 will gain the full benefits of their choice while those
people who still insist on running PHP4 may also use Pieforms if they need.
<a class="footnote-reference" href="#id2" id="id1" name="id1">[1]</a></p>
<p>If you wish to use the JSForms support, you will need a couple of extra
dependencies:</p>
<ul class="simple">
<li>The <tt class="docutils literal"><span class="pre">json_encode</span></tt> function, so that Pieforms can reply to JSForm requests.
This dependency is in fact optional - Pieforms includes Services_JSON from PEAR
which contains a pure PHP implementation. However, this is slower than the
native JSON extension for PHP, so if you have that extension it is a bonus. PHP
5 &gt;= 5.2 contains the JSON extension built in, so you do not need to worry if
you are using a version above that.</li>
<li>The <tt class="docutils literal"><span class="pre">Base</span></tt>, <tt class="docutils literal"><span class="pre">Iter</span></tt>, <tt class="docutils literal"><span class="pre">Style</span></tt>, <tt class="docutils literal"><span class="pre">DOM</span></tt> and <tt class="docutils literal"><span class="pre">Async</span></tt> modules of <a class="reference" href="http://mochikit.com/">MochiKit</a>, greater than version 1.3.1. A packed version of
MochiKit containing just these modules is available for your convenience in the
<tt class="docutils literal"><span class="pre">static/core/MochiKit</span></tt> directory, however you can use your own MochiKit if
you require other modules.</li>
</ul>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id4" id="installation" name="installation">Installation</a></h1>
<p>To install Pieforms:</p>
<ol class="arabic simple">
<li>Copy the <tt class="docutils literal"><span class="pre">pieform.php</span></tt> file and the <tt class="docutils literal"><span class="pre">pieform</span></tt> diretory (contained in the
<tt class="docutils literal"><span class="pre">src</span></tt> directory of the standard Pieforms distribution) to somewhere in your
application's directory structure. Also copy the <tt class="docutils literal"><span class="pre">JSON</span></tt> directory to the same
place if you do not have the JSON extension for PHP available and want to use
the JS form submission support.</li>
<li>If you wish to use the more advanced javascript widgets (such as the
calendar), or the JS form submission support, copy the <tt class="docutils literal"><span class="pre">static</span></tt> directory
contents to some place where your application can link to the appropriate
javascript files.</li>
</ol>
<p>And you're done!</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id5" id="using-pieforms-on-a-page" name="using-pieforms-on-a-page">Using Pieforms on a Page</a></h1>
<p>On any page in your application where a Pieform is to be made:</p>
<ul class="simple">
<li>Make sure that the MochiKit javascript file is sourced by a &lt;script&gt; tag in
the output of the page, if you are using JS forms, autofocus, or any other
javascript effect.</li>
<li>Also make sure that <tt class="docutils literal"><span class="pre">pieforms.js</span></tt> is included (which is located in
<tt class="docutils literal"><span class="pre">static/core/</span></tt>), if you are using javascript effects.</li>
<li>Include the <tt class="docutils literal"><span class="pre">pieform.php</span></tt> file.</li>
<li>You will need to call <tt class="docutils literal"><span class="pre">pieform_get_headdata()</span></tt> somewhere. This will return
an array of <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tags, <tt class="docutils literal"><span class="pre">&lt;link&gt;</span></tt> tags and other things that need to go
in the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt> of your document somewhere.</li>
</ul>
<p>As long as you have followed all of those steps, all features of Pieforms
should be available.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id6" id="configuration" name="configuration">Configuration</a></h1>
<p>Pieforms provides a way for you to configure how a &quot;default&quot; form should be set
up, as well as the &quot;default&quot; configuration for each element. You can also write
a function that is called by all forms for validation, which is useful if you
always have an element in all of your forms.</p>
<p>If none of the next section makes too much sense, don't worry too much.
Instead, skip on to the <a class="reference" href="usage.html">step by step guide</a> to creating
Pieforms, and read that. After having read that, you will quickly see the
benefits of the configuration functions provided below.</p>
<div class="section">
<h2><a class="toc-backref" href="#id7" id="configuring-a-default-form" name="configuring-a-default-form">Configuring a Default Form</a></h2>
<p>To configure a default form, you should write a <tt class="docutils literal"><span class="pre">pieform_configure()</span></tt>
function. This function should return what looks like the definition of a
Pieform, that will be used as the default for all forms. You could use this to,
for example, turn 'autofocus' on for all forms by default. Here is an example:</p>
<pre style="background-color:#ffc;border:1px solid #cc9;"><span style="color:#a1a100;" title="php/php5/keyword">function</span> <span style="color:#600;" title="php/php5/functionname">pieform_configure</span><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#008000;" title="php/php5/symbol">)</span> <span style="color:#008000;" title="php/php5/symbol">{</span>
    <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> This is just a variable specific to your application,</span>
    <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> for example purposes.</span>
    <span style="color:#a1a100;" title="php/php5/keyword">global</span> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">LIBDIR</span><span style="color:#008000;" title="php/php5/symbol">;</span>

    <a href="http://www.php.net/return"><span style="color:#a1a100;" title="php/php5/keyword">return</span></a> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> Make all forms by default POST. The default for Pieforms,</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> as for normal HTML forms, is GET.</span>
        <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">method</span><span style="color:#f00;" title="php/php5/single_string/end">'</span>    <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">&gt;</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">post</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span>

        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> Autofocus the first field of the form on page load, or the</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> first field with an error if there is an error. If there is</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> more than one form on a page, only the first is focused.</span>
        <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">autofocus</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">&gt;</span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span>

        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> Add the element type to the list of classes for each element.</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> For example, the 'text' element will get a class of 'text'. Useful</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> for styling forms when you have to support broken IE6.</span>
        <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">elementclasses</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">&gt;</span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span>

        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> Look in this directory as well as the default for plugins. So you</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> can keep your elements/renderers/rules separate from the Pieforms</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> ones.</span>
        <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">configdirs</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">&gt;</span> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">LIBDIR</span> <span style="color:#008000;" title="php/php5/symbol">.</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">form/</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span>

        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> You can add elements that will be in all forms. Here's the prime</span>
        <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> example of why you would want to...</span>
        <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">elements</span><span style="color:#f00;" title="php/php5/single_string/end">'</span>   <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">&gt;</span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span>
            <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> Using a session key for forms prevents CSRF (check google or</span>
            <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> wikipedia for an explanation). Without this, you may as well</span>
            <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> invite hackers in to play with your users.</span>
            <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">sesskey</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">&gt;</span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span>
                <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">type</span><span style="color:#f00;" title="php/php5/single_string/end">'</span>  <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">&gt;</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">hidden</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span>
                <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> This function specific to your application</span>
                <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">value</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">&gt;</span> <span style="color:#600;font-weight:bold;" title="php/php5/functioncall">get_sesskey</span><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#008000;" title="php/php5/symbol">)</span>
            <span style="color:#008000;" title="php/php5/symbol">)</span>
        <span style="color:#008000;" title="php/php5/symbol">)</span>
    <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">;</span>
<span style="color:#008000;" title="php/php5/symbol">}</span></pre></div>
<div class="section">
<h2><a class="toc-backref" href="#id8" id="validation-for-all-forms" name="validation-for-all-forms">Validation for All Forms</a></h2>
<p>Of course, with the session key in the previous section as a good example, it
would get boring pretty quickly if you had to add validation to it to all
forms. Pieforms allows you to define the <tt class="docutils literal"><span class="pre">pieform_validate</span></tt> function that
will be called whenever any form is validated to do any validation that should
be done for all forms.</p>
<pre style="background-color:#ffc;border:1px solid #cc9;"><span style="color:#a1a100;" title="php/php5/keyword">function</span> <span style="color:#600;" title="php/php5/functionname">pieform_validate</span><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#000;" title="php/php5">Pieform</span> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">form</span><span style="color:#008000;" title="php/php5/symbol">,</span> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">values</span><span style="color:#008000;" title="php/php5/symbol">)</span> <span style="color:#008000;" title="php/php5/symbol">{</span>
    <span style="color:#a1a100;" title="php/php5/keyword">if</span> <span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#008000;" title="php/php5/symbol">!</span><a href="http://www.php.net/isset"><span style="color:#a1a100;" title="php/php5/keyword">isset</span></a><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">values</span><span style="color:#008000;" title="php/php5/symbol">[</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">sesskey</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">]</span><span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">)</span> <span style="color:#008000;" title="php/php5/symbol">{</span>
        <span style="color:#a1a100;" title="php/php5/keyword">throw</span> <span style="color:#a1a100;" title="php/php5/keyword">new</span> <span style="color:#933;" title="php/php5/classname">Exception</span><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">No session key</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">;</span>
    <span style="color:#008000;" title="php/php5/symbol">}</span>
    <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">sesskey</span> <span style="color:#008000;" title="php/php5/symbol">=</span> <span style="color:#600;font-weight:bold;" title="php/php5/functioncall">get_sesskey</span><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">;</span>
    <span style="color:#a1a100;" title="php/php5/keyword">if</span> <span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">sesskey</span> <span style="color:#008000;" title="php/php5/symbol">&amp;</span><span style="color:#008000;" title="php/php5/symbol">&amp;</span> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">sesskey</span> <span style="color:#008000;" title="php/php5/symbol">!</span><span style="color:#008000;" title="php/php5/symbol">=</span> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">values</span><span style="color:#008000;" title="php/php5/symbol">[</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">sesskey</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">]</span><span style="color:#008000;" title="php/php5/symbol">)</span> <span style="color:#008000;" title="php/php5/symbol">{</span>
        <span style="color:#a1a100;" title="php/php5/keyword">throw</span> <span style="color:#a1a100;" title="php/php5/keyword">new</span> <span style="color:#933;" title="php/php5/classname">Exception</span><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Invalid session key</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">;</span>
    <span style="color:#008000;" title="php/php5/symbol">}</span>
<span style="color:#008000;" title="php/php5/symbol">}</span></pre></div>
<div class="section">
<h2><a class="toc-backref" href="#id9" id="configuring-elements" name="configuring-elements">Configuring elements</a></h2>
<p>Some elements (such as the <tt class="docutils literal"><span class="pre">calendar</span></tt>), take configuration parameters that
you may not want to specify everywhere that they are used. To prevent
duplication, you can specify a function for each element to configure it.</p>
<pre style="background-color:#ffc;border:1px solid #cc9;"><span style="color:#a1a100;" title="php/php5/keyword">function</span> <span style="color:#600;" title="php/php5/functionname">pieform_element_calendar_configure</span><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">element</span><span style="color:#008000;" title="php/php5/symbol">)</span> <span style="color:#008000;" title="php/php5/symbol">{</span>
    <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">element</span><span style="color:#008000;" title="php/php5/symbol">[</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">jsroot</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">]</span> <span style="color:#008000;" title="php/php5/symbol">=</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">/js/jscalendar/</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">;</span>
    <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">element</span><span style="color:#008000;" title="php/php5/symbol">[</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">themefile</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">]</span> <span style="color:#008000;" title="php/php5/symbol">=</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">/style/calendar.css</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">;</span>
    <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">element</span><span style="color:#008000;" title="php/php5/symbol">[</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">imagefile</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">]</span> <span style="color:#008000;" title="php/php5/symbol">=</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">/img/calendar.gif</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">;</span>
    <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">element</span><span style="color:#008000;" title="php/php5/symbol">[</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">language</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">]</span> <span style="color:#008000;" title="php/php5/symbol">=</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">en</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">;</span>
    <a href="http://www.php.net/return"><span style="color:#a1a100;" title="php/php5/keyword">return</span></a> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">element</span><span style="color:#008000;" title="php/php5/symbol">;</span>
<span style="color:#008000;" title="php/php5/symbol">}</span></pre><p>See the documentation of each element for more information about what you can
configure them to do.</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1" name="id2">[1]</a></td><td>The author works with and has authored many PHP4 projects in his time, thus eventually Pieforms <strong>will</strong> be ported for some of these projects (or for a new project if PHP4 is a requirement). Once you've used Pieforms you won't want to use anything else :)</td></tr>
</tbody>
</table>
<p><div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> &raquo; <a href="../">Documentation Home</a> &raquo; <a href="">Pieforms Configuration</a></div></p>
</div>
</div>
</div>

<div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>,
&copy; 2006 Catalyst IT Ltd. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div>
</body>
</html>
Return current item: Pieforms