Here's my computed code in a node profile:

$brand = taxonomy_node_get_terms_by_vocabulary($node->nid, 18);
$model = taxonomy_node_get_terms_by_vocabulary($node->nid, 23);
$x = 0;
$y = 0;
foreach ($brand as $term) {
$brandtag[] = l($term->name, taxonomy_term_path($term));
}
foreach ($model as $term) {
$modeltag[] = l($term->name, taxonomy_term_path($term));
$stuff= "$brandtag[$x]"." $modeltag[$y]";
$x = $x + 1;
$y = $y + 1;
$node_field[$x]['value'] = $stuff;
}

Then for the display:

$display = $node_field_item['value'];

I've stored as text in database.
Data Length: 30
Checked multiple values.

For the form, I'm using content taxonomy input fields, one after another like this:

brand
model
brand
model

I've hidden the content taxonomy fields on the display so all I get is the computed fields.

I get this result:

brand model
brand model

Which is exactly what I want. The problem is, every time I edit the node, I have to reselect all the input fields or else I get just the one line:

brand model

My users aren't going to enjoy reselecting their list each time they edit this node profile as some have very long lists, especially as I was planning to add even more checkboxes for the long lists.

The idea is to have lists with brand name and model name as clickable taxonomy terms. I almost got there, but not quite...

Any ideas for a solution more elegant than this?

Comments

colan’s picture

Status: Active » Closed (won't fix)

Version 5 is no longer supported.