CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Auto suggest on search: it should bypass the search result and go to the record
Pages: [1]

Author Topic: Auto suggest on search: it should bypass the search result and go to the record  (Read 6019 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Auto suggest on search: it should bypass the search result and go to the record
November 26, 2007, 02:58:49 am
Hello,

The auto suggest feature on the search block (left hand column on drupal) works great, but I'm not convinced by going to the search result page.

Say I type "dut" and it displays a list of contacts that start with that names, including the one I search "dutoit, xavier", when I click on it,
1) it puts the full name on the search input field,
2) I have to press the search button,
The result of the search in a one row table (thanks god, there is only one xavier dutoit making stupid requests for CiviCRM ;), I have to click on it to display the full view of the contact.

Wouldn't it be easier/quicker to bypass these steps and if I click on a name on the autosuggest list on the search, I go directly to his/her full contact record ?

Is there a short cut I missed or a configuration I should change ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Auto suggest on search: it should bypass the search result and go to the rec
November 26, 2007, 08:37:14 am

Yes, a patch to fix this would be great :)

you will also need to consider the case where there are multiple records with the same name and hence return the search screen. i suspect changing the widget to have a link to the contact OR returning the search results might be more consistent behavior

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Auto suggest on search: it should bypass the search result and go to the rec
November 28, 2007, 01:33:53 am
I'd love to be able to come back with a patch, but so far, that's a little bit black magic everywhere. This being said, the structure kind of start making sense, I'm on the right track.

I'll try the search autosuggest with two identical contact names, see if it returns two lines or one.

This being said, a easier/more generic option might be to alter the search result page, to automatically redirect to the contact page if there is only one contact in the list.

What do you think ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Auto suggest on search: it should bypass the search result and go to the rec
November 28, 2007, 04:16:23 am
The ‘redirect on a single match’ idea is bad, because there are quite a couple of actions one may (want to) make with the search result (or, more properly, search query itself) – like making a smart group, for example.

Of course, we could enable it just for the quick search, but I’m not sure what are the general UI experience ramifications with such an approach.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Auto suggest on search: it should bypass the search result and go to the rec
November 28, 2007, 08:24:03 am
Just an implementation idea we could borrow from Google, If the user knows that they just want to goto the record and not do any additional processing to the search results list, we could have that "I'm feeling lucky" button. If the user just wants to just goto the record they could start the search by hitting that button(just like at Google), otherwise just proceed as normal.

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: Auto suggest on search: it should bypass the search result and go to the rec
November 28, 2007, 08:31:56 am
I'll 2nd the "Feeling Lucky" button. There looks like there is enough real estate so it is just a matter of coding it to go to the contact record. I would not recommend going straight to editing it, just viewing it.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Auto suggest on search: it should bypass the search result and go to the rec
November 28, 2007, 10:13:53 am
I'm liking the 2 button suggestion - altho I'm not too wild about the "I'm Feeling Lucky" button label. How about something like:

[ Listings ]  [ View Contact ]


... where "Listings" takes you to the Search Listings (current behavior of "Search" button).

BTW - if there are 2 contacts with identical sort names - clicking the Search button w/ either of the them selected brings you to results listing w/ both records.
Protect your investment in CiviCRM by  becoming a Member!

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Auto suggest on search: it should bypass the search result and go to the rec
November 28, 2007, 10:43:13 am
I am in NO WAY attached to the "I'm Feeling Lucky" button text.  ;D
I was just using that as a reference to the button on the Google search site.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
I'm not feeling that lucky
November 29, 2007, 05:15:10 am
Hi,

Great suggestions !

What would be the best action if you view contact with a more (or less) than one contact ?

Error message ? search result ?

X
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Auto suggest on search: it should bypass the search result and go to the rec
November 29, 2007, 06:42:51 am
Clicking "View Contact" when no contact is selected in the search input field should probably just fire the search w/ whatever string has been entered (i.e. same action of the Listings button).
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Auto suggest on search: it should bypass the search result and go to the rec
February 20, 2008, 05:37:55 pm
Ok, I had it almost working on 1.8

It was about getting the ID of the selected contact, put it on a hidden cid field and call the contact/view page

Idea to get the id of a selection
http://shaneosullivan.wordpress.com/2006/07/30/getting-the-selected-id-from-a-dojo-combobox :
Code: [Select]
        <input type="text" name="sort_name" class="form-text required" value="" dojoType="ComboBox" mode="remote" dataUrl="{$dataURL}"
{literal}
setSelectedValue="dojo.byId('_qf_cid').value=arguments[0];

The json returns both the ID and the name of the contact, but I don't understand at all how to be able to fetch it and do something with it.

http://dojotoolkit.org/book/dojo-porting-guide-0-4-x-0-9/widgets/combobox

That's the "doc" I found, I'm lost.

Is there a dojo guru here ?

What is the new way of setSelectedValue ? Am I the only one to find the dojo doc quite not good compared to, say, jquery ?


-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Auto suggest on search: it should bypass the search result and go to the record

This forum was archived on 2017-11-26.