As with the previous examples, this one shows how to output the submitted XForms data in an HTML table but this time we are using ColdFusion 6.1 as the scripting language. (The full ColdFusion code is available here.)
After submission of the XForm, the first thing to do in the ColdFusion page is to get hold of the request data and put it into a variable. This is achieved using the GetHttpRequestData() system function:
...
...
The GetHttpRequestData() function gets ALL of the request data, the headers and the body. We are only interested in the body of the request in this example which is obtained with the content parameter. Once we have that, we convert it to a string using ToString and parse it, using the XMLParse function:
...
...
Now we have the XML document available to our ColdFusion page we can do what we want with the data. In our sample it is just to display the values in an HTML table:
...
<td>
First name
</td>
<td>
#xmlDoc.person.firstname.XmlText#
</td>
...
To try this example for yourself:
1. Install and configure ColdFusion 6.1 (Trial version available from Macromedia site).
2. Extract the person.html and showdata.cfm files from the xfserverscripts.zip (see 'Prerequisites') to the same directory in the site you have configured to use with ColdFusion.
3. Open the person.html file in notepad, or other text editor, and change the submission element action attribute to "showdata.cfm".
4. Open up Internet Explorer and go to your website eg. http://localhost/person.html
5. Change any data and submit the form.

Recent comments
14 weeks 3 days ago
14 weeks 3 days ago
18 weeks 12 hours ago
19 weeks 3 days ago
19 weeks 3 days ago
19 weeks 4 days ago
19 weeks 5 days ago
19 weeks 6 days ago
19 weeks 6 days ago
19 weeks 6 days ago