[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/rules/rules_forms/ -> README.txt (source)

   1  $Id: README.txt,v 1.1.2.4 2010/07/19 14:17:57 fago Exp $
   2  
   3  Rules Forms Module
   4  ------------------
   5  maintained by Klaus Purer <klaus.purer@gmail.com>
   6  
   7  This module allows you to manipulate/customize forms on your site with Rules. 
   8  
   9  
  10  Installation
  11  ------------
  12  
  13  The Rules Forms module ships with the Rules module - so copy the whole Rules directory
  14  to your module directory and activate the rules forms module.
  15  
  16  
  17  Warning
  18  -------
  19   Most of the conditions and actions provided for forms directly work on the form
  20   structure generated by Drupal. However in Drupal 7 this structure is going to
  21   look different, thus an automatic upgrade of the conditions/actions using the
  22   form structure cannot be implemented.
  23   Therefore notice that you will have to manually update any rules making use of
  24   the Rules Forms support.
  25  
  26  
  27  
  28  Getting started
  29  ---------------
  30  
  31  This is a short usage guide to build Rules on you forms:
  32  
  33   * Go to the "Form events" page in the Rules administration menu (admin/rules/forms).
  34   * Select the checkbox "Enable event activation messages on forms" and hit the "Save
  35     settings" button.
  36   * Go to the form on your site that you would like to customize with Rules, e.g.
  37     go to 'node/add/story' to enable events on the "Create Story" form.
  38   * On the top of the page you see a drupal message with a link to activate events
  39     for the form, click it.
  40   * Confirm the activation by clicking the "Activate" button.
  41   * Go to the "Triggered rules" admin page (admin/rules/trigger) and click the "Add
  42     a new rule" tab.
  43   * Fill out the label, choose a form event by selecting one in the "Rules Forms"
  44     group and confirm with "Save changes".
  45   * Now you can add conditions and actions to react on the form event.
  46  
  47  
  48  Form element conditions and actions
  49  -----------------------------------
  50  
  51  The Rules forms module allows you to manipulate single form elements, where you
  52  need the ID of the element. This guide shows you you how to find them.
  53  
  54   * Go to the "Form events" page in the Rules administration menu (admin/rules/forms).
  55   * Make sure that you have activated events on your target form, it should be listed
  56     on the page.
  57   * Select the checkbox "Display form element IDs" and hit the "Save settings" button.
  58   * Go to the target form on your site, where you will see the form element ID below
  59     each form element.
  60   * Copy the ID of the form element you would like to examine or manipulate, e.g.
  61     copy "body_field[body]" on the "Create Story" form if you want to do something
  62     with the node body textarea.
  63   * Paste this ID when you create a condition or an action which requires a form
  64     element ID.


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7