I would like an autocomplete field which would be used to select a child node to attach. As relativity is now, it is not usable when there are thousands of possible children nodes, since a page must load with this entire list.
This should function in the same way as the the autocomplete field which is on the node edit page, used to change "Authored by:". For my purposes it is enough to have it search through the title field, though it may be best to design it to allow it to be configured to search node id, since title isn't necessarily unique.
An additional feature which would be beneficial, but is not necessary, would be to have multiple autocomplete fields, which would allow people to choose many nodes at the same time.
Comment | File | Size | Author |
---|---|---|---|
#10 | DRUPAL-5--2.autocomplete.patch | 7.99 KB | a_c_m |
#8 | HEAD.autocomplete.patch | 10.51 KB | a_c_m |
#7 | HEAD.autocomplete.patch | 9.82 KB | a_c_m |
#6 | HEAD.autocomplete.patch | 9.19 KB | a_c_m |
#2 | exsample.png | 41.86 KB | a_c_m |
Comments
Comment #1
a_c_m CreditAttribution: a_c_m commentedDone!
Attached 2 patches, one for 2.3 and another for HEAD, let me know how you get on.
a_c_m
Comment #2
a_c_m CreditAttribution: a_c_m commentedHere is an example of it working on some test data.
Comment #3
a_c_m CreditAttribution: a_c_m commentedwhoops, totally forgot to add filtering by the partly typed keyword, at the moment it will just return all values, oops - working on a new version now.
Comment #4
a_c_m CreditAttribution: a_c_m commentedComment #5
a_c_m CreditAttribution: a_c_m commentedComment #6
a_c_m CreditAttribution: a_c_m commentedJust the HEAD patch this time, if people want a 2.3 patch once this one is shown to work as expected, i might make one.
Also currently the auto complete will match against any part of the title e.g. auto complete "c" from the group [cat, dog, frog, coat, jacket, shoes] will match [cat, coat, jacket] not just [cat, coat] - do people think this is correct, or should it just match from the start?
a_c_m
Comment #7
a_c_m CreditAttribution: a_c_m commentedHaving a major problem with this patch. Cant get more than one auto-complete working on a single page. Problem is http://drupal.org/node/127156#comment-901691 any help is GREATLY apprecated.
Latest patch is attached, has print_r($form_values);return null; on line 1716 of the relativity_autocomplete_child_submit function, for debugging.
Comment #8
a_c_m CreditAttribution: a_c_m commentedHurray ! Working at last ! (how i got it working is here http://drupal.org/node/127156#comment-901731)
Please test and report back !
Comment #9
darius CreditAttribution: darius commentedThanks, once I get a few confirmations that it works, I will commit the patch. One thing though: could you post a diff from the dev branch 5.x-2.x-dev, rather than HEAD. HEAD is quite outdated, and is not to be used.
Darius
Comment #10
a_c_m CreditAttribution: a_c_m commentedHere is the patch.
Comment #11
kansaj CreditAttribution: kansaj commentedHi
I have just tested the auto complete patch and have the following problem: it works fine when nodes are shown as teasers, but when I try to use it in full node view the auto complete does not work. Wondering what could be the problem. Tnx