Hmmm. I can't yet understand what you are trying to do. Please give a use case. I'll add that autocomplete can certainly return full HTML for each match so we could show a profile picture along with each matching user if we desired. I saw this on some site and it looked terrific IMO. It seems that other modules have also tacked this problem when author has to identify a 'related node' in a form. One module (relativity?) adds a link (for current user only) to all nodes which reads 'use this node for x' when you are searching for a related node. It also offers a 'cancel searching' link. The destination on each link takes you back to its form after some processing has occurred. Might be an option in your case. On 4/18/06 6:43 AM, "Gerhard Killesreiter" <gerhard@killesreiter.de> wrote:
Hi there!
I have a problem with autocompletion for selecting a node by title.
This is a very noce methid to find a node, but the problem is that it is ambiguous. There might be several nodes by the same name. You can try to make it less ambiguous by adding the author's name and or the date, but only the node ID will do away with ambiguity. The problem is that the UI does not look really nice.
I've thought about a way to transfer more information in the request, but this is problematic. After all an autcompletion field is just a textfield. Also, we need to keep non-JS browsers in mind and if I essentially require CSV data in the textfield this is a usability nightmare for these people. To process CSV data for select fields is also not much fun and error prone.
Now, the following idea won't help non-JS browsers at all, but it will be helpful for JS-browsers. The idea is to store all the information about the selection made by the user in a session variable.
You can already assign the available selections to a session variable after populating the array of matches. What is required is to make this information contain only the actual selected value. To this end the JS would need to run the autocompletion function one more time after the user has moved out of the select field.
My questions are:
1) Is this possible? 2) Does anybody else consider this a good idea?
Cheers, Gerhard