I have the repeat behavior working great on a few fieldsets. I am using ColdFusion so I had to change the default separator for the suffix from "-" to "_" as CF does not support "-" in the variable name. I changed the following lines in the wforms.js file:
I get the counter to show the proper number repeated sections, but when I remove one it does not detriment from the counter. Four adds and a remove still yield a repeat counter of 5.
That's by design, see the section called 'sequence gap' here: http://www.formassembly.com/blog/wforms-server-side-handling-of-the-repeat-behavior-part-2/
By the way. The new version of wForms (v3.0, not officially available yet) uses an array notation instead of the '-' separator. I don't know if that helps with ColdFusion, but let me know if you want to try it. You end up with something like this:
fieldname[0] -> orignal field fieldname[1] -> first duplicate fieldname[2] -> second duplicate
If you have nested repeats, you get something like this: fieldname[0][1]
Right after I posted I saw that post. I would love to try v3.0. Do you have a listing of improvements or changes handy? If not I can try to figure it out. Thanks.
You can browse the repository here: http://svn.berlios.de/svnroot/repos/wforms/branches/3.0/
Here's a quick overview of the changes: - There's a new calculations behavior for computed fields (see the test folder for examples). - The switch behavior now works on multi-page forms (i.e. you can skip pages) - wForms 3 uses Dean Edward's Base2 library. - Behaviors should be customizable more easily - Repeat behavior now uses the array notation [] (makes it easier to use with PHP)