home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (README.txt)

This example Drupal source code file (README.txt) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

and, element, form, forms, go, id, module, of, on, rules, the, to, with, you

The README.txt Drupal example source code

$Id: README.txt,v 2010/07/19 14:17:57 fago Exp $

Rules Forms Module
maintained by Klaus Purer <klaus.purer@gmail.com>

This module allows you to manipulate/customize forms on your site with Rules. 


The Rules Forms module ships with the Rules module - so copy the whole Rules directory
to your module directory and activate the rules forms module.

 Most of the conditions and actions provided for forms directly work on the form
 structure generated by Drupal. However in Drupal 7 this structure is going to
 look different, thus an automatic upgrade of the conditions/actions using the
 form structure cannot be implemented.
 Therefore notice that you will have to manually update any rules making use of
 the Rules Forms support.

Getting started

This is a short usage guide to build Rules on you forms:

 * Go to the "Form events" page in the Rules administration menu (admin/rules/forms).
 * Select the checkbox "Enable event activation messages on forms" and hit the "Save
   settings" button.
 * Go to the form on your site that you would like to customize with Rules, e.g.
   go to 'node/add/story' to enable events on the "Create Story" form.
 * On the top of the page you see a drupal message with a link to activate events
   for the form, click it.
 * Confirm the activation by clicking the "Activate" button.
 * Go to the "Triggered rules" admin page (admin/rules/trigger) and click the "Add
   a new rule" tab.
 * Fill out the label, choose a form event by selecting one in the "Rules Forms"
   group and confirm with "Save changes".
 * Now you can add conditions and actions to react on the form event.

Form element conditions and actions

The Rules forms module allows you to manipulate single form elements, where you
need the ID of the element. This guide shows you you how to find them.

 * Go to the "Form events" page in the Rules administration menu (admin/rules/forms).
 * Make sure that you have activated events on your target form, it should be listed
   on the page.
 * Select the checkbox "Display form element IDs" and hit the "Save settings" button.
 * Go to the target form on your site, where you will see the form element ID below
   each form element.
 * Copy the ID of the form element you would like to examine or manipulate, e.g.
   copy "body_field[body]" on the "Create Story" form if you want to do something
   with the node body textarea.
 * Paste this ID when you create a condition or an action which requires a form
   element ID.

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal README.txt source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.