Why module displays both tid and name in autocomplete field? Action:1395, Flight Combat:2442 That confuses administrators...

Comments

sdrycroft’s picture

Status: Active » Closed (works as designed)

A term can easily be repeated within a taxonomy:

America
- New York
-- Soho
Britain
- London
-- Soho

NoRandom’s picture

Version: 6.x-1.6 » 6.x-1.7
Category: support » feature

Some users seems to be confused by this issue. Could be possible to rebuild this feature with a more themeable method?

For example:

[Field-Label:]
[Autocomplete text area]   [tid number]

This way admins are allowed to hide the tid number, make it more discreet and show clearly it's not part of the term name.

Regards.

quotesbro’s picture

Status: Closed (works as designed) » Active
prabhakarsun’s picture

On line 191,

replace

$result = db_query_range(db_rewrite_sql("SELECT t.tid, CONCAT(t.name,':',t.tid) AS name FROM {term_data} t , {term_lowername} l WHERE t.vid = %d AND l.tid = t.tid AND lowername LIKE LOWER('$contains%s%%')", 't', 'tid'), $vid, $last_string, 0, 10);

with

$result = db_query_range(db_rewrite_sql("SELECT t.tid, t.name AS name FROM {term_data} t , {term_lowername} l WHERE t.vid = %d AND l.tid = t.tid AND lowername LIKE LOWER('$contains%s%%')", 't', 'tid'), $vid, $last_string, 0, 10);
prabhakarsun’s picture

Actually that doesn't save terms.

To avoid confusion, it can show hierarchy of term while selecting, instead of tid.