Hello,
I'm a newbie with Drupal and could not find an answer to the following problem in the forum nor the documentation, hence this post.
I'm trying to use CCK to provide a single text field with the capability of inserting multiple values, separated by commas, or semi-colons. E.g.: entering "Doe, John; Doe, Jane" in the input field, it would split values by the separator, then proceed to the correct insertion of data.
Let's say John Doe and Jane Doe are "authors" -- not users, and the input field is displayed at the creation of an "article".
- First case: the value for the author already exists in the database
- The newly created article references the author by its field id.
- Second case: the author is unknown
- Before creating the article, a new author entry is created, then the correct reference is added to the article.
This type of field would be better used with an autocomplete field, a bit like del.icio.us tags, but with a different separator (not space).
I ignore if the solution to this requires a custom CCK development, or if it can be done using existing stuff, but I hope this thread will be useful.
Comments
subscribing
I'm also interested even if i requires custom code, which I suspect will be the case.
NancyDru
Current limitation with multiple values
The current limitation I face is that choosing the multiple values for a text field provides only 3 fields, where I would need anything from 1 to n. If there is an easy way to customize this, e.g: provide a "more" link that adds a new field on-the-fly, I could go that way. But I guess it also requires patching, so if I can get directions, I'll try and code the above proposal.
==
hk
I think you will find it allows for more than 3
Just not on a single edit. Trying adding a content type with multiple text fields, add 3 of them, save the content and re-edit, you should be able to add 3 more.
Ahaha! UI design by programmers ;o)
I had not thought about such a possibility and reading it made me laugh out loudly! Sure, it can work pretty well, but it sounds like hell for users. At least, it will work until I find another, better solution, so thank you for the tip =8)
==
hk
Did you ever find a better
Did you ever find a better way to do this? I'd love to have this functionality as well. Thanks!
Can the multi-variant property list be limited?
The form does expand to add 3 additional fields each time you commit the form with multiple values list populated. But I have a case where I must limit the list to N entries. Is there anyway to put a range, i.e. cardinality on the number of entries?
subscribing
subscribing
subscribe
subscribe