Forms Processing: Updating Only Changed Data

2010-03-10 Thread Blizzm
We have several lengthy forms that are going to be used for updating records and various data.  We are also looking at recording which form fields have been updated. Is there a means for updating only those records which have changed?  I was thinking of looping through a form collection,

Re: Forms Processing: Updating Only Changed Data

2010-03-10 Thread Eric Cobb
The first thing that jumps out at me would be to have hidden form fields in the form that contain the original values. Then, when you're processing the form any value that doesn't match its corresponding hidden value has been changed. thanks, eric cobb ecar technologies, llc

Re: Forms Processing: Updating Only Changed Data

2010-03-10 Thread Tom McNeer
Some of the answer depends on your overall architecture. The first step would be to retrieve the relevant database record using the ID passed from your form. That would give you, in some manner (a query record, a bean, whatever) a representation of the existing data. Then you could write a

Re: Forms Processing: Updating Only Changed Data

2010-03-10 Thread Eric Cobb
After reading my answer, I realize the way I worded it may be confusing. Here's an example. On your form: input type=hidden name=Val1_orig value=#val1# input type=text name=Val1 value=#val1# On your processing page. cfif form.Val1 neq form.Val1_orig !--- this element has been changed.