Revision: 279
http://pieforms.svn.sourceforge.net/pieforms/?rev=279&view=rev
Author: oracleshinoda
Date: 2008-01-03 02:33:35 -0800 (Thu, 03 Jan 2008)
Log Message:
-----------
Added an install step saying about pieform_configure(), which also mentions jsdirectory.
Hopefully, this should make setting up pieforms for the first time easier.
Also reduced the number of steps to do when including pieforms on a page (removed some obvious ones), and explained about pieform_get_headdata() in more detail.
Modified Paths:
--------------
pieforms-php5/trunk/INSTALL
Modified: pieforms-php5/trunk/INSTALL
===================================================================
--- pieforms-php5/trunk/INSTALL 2008-01-03 10:33:18 UTC (rev 278)
+++ pieforms-php5/trunk/INSTALL 2008-01-03 10:33:35 UTC (rev 279)
@@ -33,6 +33,19 @@
submission, copy the 'static' directory (or the contents of it) to some place
where your pages can link in the appropriate javascript files.
+ 3) In a library file that you know will always be included, put a function
+ called pieform_configure. This function should return a hash representing how
+ you want your pieforms configured by default. Here is an example:
+
+ function pieform_configure() {
+ return array(
+ // Make forms submit by POST by default
+ 'method' => 'post',
+ // URL to the directory where pieforms.js resides
+ 'jsdirectory' => '/js/pieforms/'
+ );
+ }
+
And you're done!
Using Pieforms on a Page
@@ -42,11 +55,10 @@
* Make sure that the MochiKit javascript file is sourced by a <script> tag in
the output of the page.
- * Some more advanced widgets use pieforms.js. Make sure to include this also
- if you're after this support
- * Include the 'pieform.php' file
- * You need to call pieform_get_headdata() somewhere. This will return an array
- of <script> tags, <link> tags and other things that need to go in the <head>
- of your document somewhere.
+ * You need to call pieform_get_headdata() somewhere AFTER you have defined all
+ of your forms. This will return an array of <script> tags, <link> tags and
+ other things that need to go in the <head> of your document somewhere. A
+ good place to call this is in your header template file, should you be using
+ some kind of templating system.
-- Nigel McNie <ni...@ca...>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|