By _-dave-_ on
Hi
I am trying to get a form repeat feature working with Drupal (JSTools). To make this work I need to be able to output fieldset names in an array format as follows:
name="edit[location_highlights][][description]"
name="edit[location_highlights][][distance]"
location_highlights is a fieldset form class.
description and distance are input fields.
Is there any way to do this through the forms api? I have been through the api reference, google and drupal.org but cannot find any reference to this requirement!
ps - Is drupaldoc.org down (04 June 2006) or is it me?
Thanks
Dave
Comments
drupaldoc.org is deprecated
use http://api.drupal.org/ instead.
- Robert Douglass
-----
My Drupal book: Building Online Communities with Drupal, phpBB and WordPress
Fixed
Ok, managed to fix it although not the most elegent solution...
Changed the line (about 262) in wforms.js from:
var value = attribute.nodeValue + idSuffix;to:
Updates any array decleration in the name attribute with the current row count.
NB: This change was made in the verbose version of wforms.
Thanks
Dave