Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I need the description of the selected term to be displayed under the dropdown. Any code suggestion would be appreciated.
Thanks
Comments
Comment #1
solipsist CreditAttribution: solipsist commentedBeen playing around with a workable solution. I haven't tested it but it seems to work. It requires modifying the module (see attached patch against current recommended release, not head mind).
SHS makes an AJAX call to retrieve terms. The resulting response doesn't include descriptions, but SHS allows you to hook in so that can be fixed. What does need hacking is making SHS provide hooks of a sort by providing JavaScript events ($.triggerHandler) we can use to trigger our own code.
This is not a finished solution, or particularly pretty, but it's something you can work with, I hope.
Put this in a custom module:
Add this to a custom JavaScript file:
Use the this patch to make the necessary changes to shs.js:
Comment #2
setki CreditAttribution: setki commentedDid somebody tried this?
I can't get it to work at my side. Still displaying "name" iso "description"
Or can somebody make a "shsd"-module with this implemented?
Comment #3
torgormack CreditAttribution: torgormack commentedSorry I'm a bit late to this party - but has anyone managed to get this to work or is there a module?
Comment #4
stBorchertSorry, but this isn't possible out-of-the box with this version.
Comment #5
velocis CreditAttribution: velocis commentedI needed this quite quickly, so dirty hack would be to mod line 599 of the shs.module. (Would be nice to see this is an option that can be turned on and off as needed).
From
To