Managed Hosting



Form Utilities CFC
Project Home Blog Forums Wiki Known Issues Contact Project

Author: Brian Kotek (All RIAForge projects by this author)
Last Updated: December 15, 2009 10:55 PM
Version: 1.0 Beta
Views: 96,829
Downloads: 2,315
Demo URL: http://www.briankotek.com/blog/index.cfm/2007/9/4/Implicit-Creation-of-Arrays-and-Structures-from-Form-Fields
License: Apache License, Version 2


The main capability of this CFC is to generate arrays and structures on the ColdFusion server based on the names of your form fields. So a form field named "user.firstName" would create a structure named "user" with a key of "firstName", holding the value of that field.

It will also generate arrays. A form field named "user[1].firstName" would create an array, with the first element in the array being a structure called "user" with a key of "firstName".

These can be created to any arbitrary level of complexity.

The CFC also has a handy function that will take an original list and a new list, and return a structure telling you what was added to the the list, removed from the list, and what stayed in the list. Useful for handling forms with checkboxes.

Fix added to handle situations where a form collection key and a form field had the same name.


Tested on CF8, but should run on CF 6.1+.

Issue Tracker:

6 CURRENTSCOPE is undefined Fixed 10/15/13 11:48 PM
5 append to array instead of setting at index Closed 04/26/10 4:08 PM
4 alternative input name? conflict with cfajax binding... Open 04/26/10 1:19 PM
2 jQuery CSS selectors Closed 11/04/08 3:05 PM
3 Struct Keys names with brackets Closed 11/04/08 3:05 PM

View All Issues

To enter issues for this (or any other) project, you must be logged in.

Subversion Access:

You may access this project's Subversion repository with your client here: http://svn.riaforge.org/formutils.

To view files and changelists associated with this repository, go here: http://formutils.riaforge.org/index.cfm?event=page.svnbrowse.

Anonymous users have read access to the repository while the administrator has write access.

This project is sharing its code via Subversion. Subversion is an open source source control method. You may find more information about Subversion here: http://subversion.tigris.org/