4

I have altered #autocomplate_path for node queue autocomplete node suggestions to show image field along with title and nid, which is working fine. The code which is returns the image with title and nid is.

$matches[$node->nid] = theme('image_style', array('style_name' => $get_image_field_style, 'path' => $image_field_uri, 'attributes' => array('class' => array('nodequeue-runsheets-images'))))
              . check_plain($node->title)
              . " [nid: $id]";

This is how I see the results with the above working code: -enter image description here

The problem comes when drupal autocomplete pull the selected suggestions and populate it to autocomplete textfield. I see the html tags as . How can I override this to show only node title and mid.

The problem:

enter image description here

1 Answer 1

2

The solution in following post worked for me http://www.derreklemar.net/tutorial/drupal-autocomplete-overriding-default-select-event-behavior

1
  • Too bad the link is now dead. However, the actual question gave me the direction I needed. I simply wasn't sure on how to mix in HTML into the autocomplete results. Now, I know! Thanks!
    – Gor
    Commented Mar 22, 2015 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.