Closed (fixed)
Project:
Form Builder
Version:
7.x-1.x-dev
Component:
Form Builder Core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2012 at 08:35 UTC
Updated:
28 Jan 2012 at 09:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchHere's a set of patches that adds this ability to Drupal 7 and backports some of the changes (including partial validation of form element keys) to Drupal 6. This helps along #497386: Prevent duplicate key names when re-ordering form a little bit, since it's much more likely that you'll end up with duplicate keys if you're just dragging in 10 new textfields. Each time you edit one of the textfields, you'll have to set a label or field key or run into duplicate key errors. In any case, it's still an improvement over a bunch of fields with new_* names.
D6 doesn't get the auto-key functionality, as #type = 'machine_name' didn't exist in Drupal 6.
This patch also makes a few changes to the attachment of behaviors. Previously we were calling Drupal.attachBehaviors() on the form element wrapper, though this had negative consequences of re-attaching behaviors to both the previewed element (good) and the field configuration form (bad). The new approach only affects the necessary part of the form and not everything.
Comment #2
quicksketchCommitted to both branches of the project.