Experimental project

This is a sandbox project, which contains experimental code for developer use only.

A common request with Webforms is to pull data from arbitrary nodes into the form. Webform by itself does not support this. This module lets you pull CCK data from any node on your site into your webform. This is complicated to explain, but easy by example:

* You have a Contacts content type, and a webform block to email them. The webform's destination email address should be the address in the Contact's "email" field. You can use Webform Node Data to automatically pull the email address from the displayed contact into a hidden field on the webform, and use Webform's built in emailing abilities to send your message.

* You have a Products content type, and a webform which receives information requests about each product. In order to keep track of requests, you have to know which Product each request is for. You can use Webform Node Data to pull the Product Titles into a field in the webform.


* Get data either from the currently displayed node, or from another node specified in a field on the webform. This means that you can use whatever tricky processing you can dream up to set the source NID - it's particularly useful for using URL arguments to specify which node has the data you want.

* Get data from any field on that node, including CCK fields.

* Put the data into any kind of webform field: hidden or visible, select, textentry, whatever.

* Set the module to be active only on one particular webform on your site.


Webform module. That's it. If you have Webform, you're good to go.


Simply install the module as usual, and configure it at admin/settings/webform-node-data . There you will set:

* the NID of the webform to apply to (0 for all webforms)
* the field on that webform which contains the data source's NID (or enter \ to get it from the currently displayed node)
* the field on the data source node which contains your "target data" (ie field_contact_email)
* the type of data in that field. use "email" for CCK email fields, and "value" for CCK textfields
* the destination field on the webform which should receive the data.

Project Information