Multi-select with create new node

jastraat - April 23, 2007 - 15:28
Project:Addnode
Version:5.x-1.2
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

It's only possible to attach multiple node references using the select box for addnode. If a user attempts to create a new node after attaching a previous node reference, they will lose all previous node references. A user needs the ability to have an 'attached node list' or something like that. Or the ability to both create a new node as well as selecting existing nodes.

#1

Lionfish - May 3, 2007 - 08:15

Interesting idea. I've not yet really dealt with the multiple or single items or coping with 'required' being checked. Should be quite easy to add though, but I'm not sure whether it's necessary to allow a user to select stuff from both the select list AND create a new item, that would make the user interface even more confusing than it is now, and to be useful the user would need to be allowed to create an arbitrary number of nodes...

#2

Mariano Absatz - May 3, 2007 - 19:06
Version:5.x-1.0» 5.x-1.1

I have precisely this case.

I have people that have their own bio profile and they list the projects they work on. If the project(s) have already been created (by the same or other person), they are selected in the select box, however, this person may have another project to add (independently if they have already selected or not other projects), so they use the create new project option... but they loose all the selections they previously had :-(

What's more, as I have the field configured as multiple, even when they don't have any project selected, the new project they create via addnode at that time, doesn't get referenced.

#3

jastraat - June 12, 2007 - 22:27

Is this going to potentially be addressed in a later version? I just downloaded 5.x-1.2, and I still can't do a multi-select with creating a new node.

#4

surge_martin - August 3, 2007 - 12:16

I'm also wrestling with this issue. Ideally, I'd even like to allow the user to edit the subnode's information inline, but from the experimentation I've done, subform_element would need a fair bit of work to be able to generate multiple subforms of the same type that don't conflict, especially for validation purposes.

At the very least, I would like to allow users to select items, and possibly add new nodes as well through the form. The problem seems to be that once you choose to add a new node, any previously attached nodes are lost. I'd like the new node to be in addition to previously attached subnodes when multiple values is part of the field definition.

I think in the context of a field that is meant to accept multiple values, allowing the user to attach existing nodes and create a new one is more logical, even if it is potentially more complicated for the user.

As I see it, the main difficulties would be changing the logic to merge the two results, and having the add node configured to behave properly depending on whether or not the field has been specified to accept multiple values.

#5

aaron - August 24, 2007 - 21:08
Title:Multi-select with create new node» Multiple addnode fields fail

If you have more than one addnode field in a node, regardless of how it shows up, they all fail.

Steps to reproduce in another fashion than mentioned above:
create a type to be referenced, such as image
create a type to test, such as article
create an addnode field to image, called something like 'teaser image'
create an addnode field to another image, called something like 'article image'
add the article, attempt to add an image in teaser image -- it fails

#6

bsuttis - September 8, 2007 - 00:20

Has anyone made progress regarding this issue? Particularly the ability to save previously 'selected' nodes while entering a new one?

I can (help) fund a bounty if a developer would like to take this on.

#7

bsuttis - September 8, 2007 - 01:40
Title:Multiple addnode fields fail» Multi-select with create new node

Just reverting the title change.

#8

panis - September 17, 2007 - 10:22

I worked for one of the posters here to resolve the issue of multi-select and an additional requirement for him with a patch on the module.

I also have a preliminary design to redo this module using ajax to make it easier and cleaner to use. I am looking for sponsors on a bounty to resolve additional issues and add functionality to this module. Please contact me with your requests via my contact form.

#9

panis - September 26, 2007 - 10:37
Version:5.x-1.1» 5.x-1.2

The attached patches help fix the following requirements;

- multiple nodes can be selected while adding a new node
- previously selected nodes do not get deselected when a new node is added.
- if you add a new node, the user stays in the edit screen allowing more nodes to be added.

The patch updates the .js file and the .module file.

Side-effect: You cannot add a new node and exit the edit page at the same time. You will again have to hit submit after adding a new node to exit out of the node edit page.

This patch is sponsored by Brian Suttis

AttachmentSize
addnode.patch 4.66 KB

#10

discursives - December 4, 2007 - 07:47

great work panis, aand thanks Brian. Any more plans you want to accept bounty for, Panis?

#11

Richard Eriksson - December 6, 2007 - 00:18

Just for reference, the patch applies to HEAD, not to 1.2.

 
 

Drupal is a registered trademark of Dries Buytaert.