Login

    Register

PROJECT CATEGORIES

 

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

Author: Brian Kotek (All RIAForge projects by this author)
Last Updated: October 10, 2007 10:42 PM
Version: 1.0 Beta
Views: 12002
Downloads: 699
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

Description:

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.

Requirements:

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

Issue Tracker:

ID ISSUE STATUS UPDATED
2 jQuery CSS selectors Closed 11/04/08 3:05 PM
3 Struct Keys names with brackets Closed 11/04/08 3:05 PM
1 Exceptions up the wazoo! Closed 09/13/07 12:24 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.

You may download the latest set of files from Subversion as a zip file.

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/