/[drupal]/contributions/modules/openresort/wforms/README.txt
ViewVC logotype

Contents of /contributions/modules/openresort/wforms/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Aug 15 03:14:04 2007 UTC (2 years, 3 months ago) by marcingy
Branch: MAIN
CVS Tags: DRUPAL-5--1-9-1, DRUPAL-5--1-11-3, DRUPAL-5--1-11-2, DRUPAL-5--1-9-3, DRUPAL-5--1-9-2, DRUPAL-5--1-8-2, DRUPAL-5--1-8-1, DRUPAL-5--1-14-1, DRUPAL-5--1-14-2, DRUPAL-5--1-14-3, DRUPAL-5--1-14-4, DRUPAL-5--1-14-5, DRUPAL-5--1-14-6, DRUPAL-5--1-8-3, DRUPAL-5--1-9, DRUPAL-5--1-8, DRUPAL-5--1-5, DRUPAL-5--1-4, DRUPAL-5--1-7, DRUPAL-5--1-6, DRUPAL-5--1-15-1, DRUPAL-5--1-0, DRUPAL-5--1-3, DRUPAL-5--1-15-2, DRUPAL-5--1-11-1, DRUPAL-5--1-12-8, DRUPAL-5--1-12-9, DRUPAL-5--1-11-4, DRUPAL-5--1-13-1, DRUPAL-5--1-12-2, DRUPAL-5--1-12-3, DRUPAL-5--1-12-1, DRUPAL-5--1-12-6, DRUPAL-5--1-12-7, DRUPAL-5--1-12-4, DRUPAL-5--1-12-5, DRUPAL-5--1-7-4, DRUPAL-5--1-7-3, DRUPAL-5--1-7-2, DRUPAL-5--1-16-6, DRUPAL-5--1-16-4, DRUPAL-5--1-16-5, DRUPAL-5--1-16-2, DRUPAL-5--1-16-3, DRUPAL-5--1-7-1, DRUPAL-5--1-16-1, DRUPAL-5--1-15, DRUPAL-5--1-14, DRUPAL-5--1-16, DRUPAL-5--1-11, DRUPAL-5--1-10, DRUPAL-5--1-13, DRUPAL-5--1-12, DRUPAL-5--1-12-10, DRUPAL-5--1-12-11, DRUPAL-5--1-12-12, DRUPAL-5--1-12-13, DRUPAL-5--1-12-14, DRUPAL-5--1-12-15, DRUPAL-5--1-12-16, DRUPAL-5--1-12-17, DRUPAL-5--1-12-18, DRUPAL-5--1-12-19, DRUPAL-5--1-2, DRUPAL-5--1-1, HEAD
Branch point for: DRUPAL-5
File MIME type: text/plain
*** empty log message ***
1 Drupal wforms.module README.txt
2 ==============================================================================
3
4 Created by CivicSpace Labs as part of a project for GoodStorm, this module
5 provides methods for client-side interactive forms using the wForms library
6 by Cédric Savarese (http://www.4213miles.com). See wForms documentation at
7
8 http://www.formassembly.com/wForms/
9
10
11 Requirements
12 ------------------------------------------------------------------------------
13 This module is written for Drupal 4.7.
14
15
16
17 Installation
18 ------------------------------------------------------------------------------
19 Create a directory modules/wforms (or, for easy updating,
20 modules/jstools/wforms) and copy all the module's files into it.
21
22 The wForms library must be downloaded separately from
23
24 http://www.formassembly.com/wForms/
25
26 See the download link for the wForms v2.0 "packed version".
27
28 Copy the following three files from the download to your /wforms
29 module directory:
30
31 wforms.css
32 wforms.js
33 wforms-jsonly.css
34
35 Enable the module via the administer > modules page.
36
37
38 Developer usage
39 ------------------------------------------------------------------------------
40
41 Multi-page forms
42 ----------------------
43
44 Each page of the form is an element of type 'wformspage'. This
45 element type is basically a wrapper that encloses form sections in
46 a div with the appropriate class names to trigger the wForms multi-
47 page behavior.
48
49 Construct a multi-page form as follows:
50
51 // First page
52 $form['page1'] = array(
53 '#type' => 'wformspage',
54 '#title' => t('Page 1')
55 );
56 $form['page1']['title'] = array(
57 '#type' => 'textfield',
58 '#title' => t('Title'),
59 '#description' => t('Give a title to your item'),
60 '#required' => TRUE,
61 '#size' => 30
62 );
63
64 // Second page
65 $form['page2'] = array(
66 '#type' => 'wformspage',
67 '#title' => t('Page 2')
68 );
69 $form['page2']['body'] = array(
70 '#type' => 'textarea',
71 '#title' => t('Description'),
72 '#description' => t('Describe your item'),
73 '#rows' => 3,
74 '#cols' => 30,
75 '#required' => TRUE
76 );
77
78 Validation
79 ----------------------
80
81 Validation for required fields works out of the box, as wForms recognizes
82 Drupal 'required' class names.
83
84 For other types of validation, add classes that trigger validation
85 behaviors--see the list of supported selectors at:
86
87 http://www.formassembly.com/blog/input-validation-explained/
88
89 Example:
90
91 $form['page1']['email'] = array(
92 '#type' => 'textfield',
93 '#title' => t('Email'),
94 '#size' => 30,
95 '#attributes' => array('class' => 'validate-email')
96 );
97
98 Further functionality
99 ----------------------
100
101 Other behaviors can be added through adding classes and enclosing divs
102 to form elements (e.g., using form elements' '#prefix' and '#suffix' selectors).
103
104 See the wForms documentation, http://www.formassembly.com/wForms/

  ViewVC Help
Powered by ViewVC 1.1.2