When you try to have several CCK edit forms on one page, as for example the editview module allows you to, and one of the form's fields can have multiple values you run into problems. Several AJAX calls stops working properly (add more button, dragging the list elements), due to duplicate #id values and/or #id values which are different after the first time rebuilding the form.
The attached patch solves this, by:
- giving the wrapper which is used a replacement base for the Add More functionality a unique identifier
- giving the add more button itself a unique identifier
- giving the table around the draggable list a unique identifier
All unique identifiers are generated by adding the node number to either the form element index name or an explicit #id. If the node number is not available (for example, when adding a new node), the old names are used.
| Comment | File | Size | Author |
|---|---|---|---|
| cck-unique-ids-for-multiple-forms-2.9.diff | 1.76 KB | Frodo Looijaard |
Comments
Comment #1
murzDoes this fixed in Drupal 7.x with fields in core, or I must apply some patch manually?