Hello,
I'm working on converting an existing 4.6.x site to 5.1, and I'm trying to use the CCK group of modules instead of my own cobbled-together code like I did last time. I'm trying to set up a content type, and I've run into a problem with the node_reference field type.
Basically, I need to use the auto complete text field type, and I will need multiple values, but when I select those options, I only get three autocomplete text boxes. I'm going to need as many as 15 or 20 in some cases, but usually more like 4 or 5. Is there any way to add more boxes? It seems it would be pretty easy (from an interface point of view) to have a "add more" button that would insert an extra three fields when clicked.
I'm writing this here because I'm hoping it's something already built in that I've overlooked, but if not, this seems like a pretty logical feature to request.
Thanks in advance for any suggestions.
Comments
If you use all 3 save the form and re-edit
If you use all 3 save the form and re-edit, more autocomplete fields will be added (it appears there are always 3 free inputs each time you edit)
That does work
Ok, I thought it was something like that -- and it does work. Thanks!
It creates an unusual work flow, however, and it seems like it would make more sense if the extra fields appeared when you preview the node. It just seems awkward, especially for node types that default to "published" and the front page, to have publish it multiple times before it's complete. Does this make sense to anyone else? I'm curious enough about it to start looking through the module code to see if I can figure out what would need to be changed.
I agree ... it would
I agree ... it would definitely be desirable to modify this to create a more effective worfklow/ui
In the works possible patch
See here...
http://drupal.org/node/81197
http://drupal.org/node/103544
Use form_alter to add more multiple nodereference fields
I've added more using a form_alter:
There's still some hard-coding here in terms of the field name and description, but at least it's not hacking the nodereference.module itself.
Charles
www.parkroad.co.za
Charles
Drupal development, Cape Town, South Africa