<div dir="ltr"><div><div><div><div>I have an ajax callback for typeahead of a taxonomy reference field. In the value part of the array I put the term with a beadcrumb, so if it's Lab, the value looks like <br><br></div>
Dog > Sporting > Lab<br><br></div>The problem I'm having is the key. When I get to the validate function and dump the value of the reference field, the key I use in the select array is in the term->name field, and the term->tid field contains 'autocreate'. I've tried putting just the tid in the array key, then tid:title, title:tid, and finally I used the example (for node reference) in the example module's ajax typeahead example, which is<br>
<br> $matches[$term->name . " [$term->tid]"] = $name . $term->name;<br></div> <br>($name is the taxonomy breadcrumb). <br><br></div>How do I load the array so that the selected term is shown in the reference field as $term->tid = tid and $term->name = name?<br clear="all">
<div><div><div><div><div><br>---<div><a href="http://drupal.org/user/367108" target="_blank">drupal.org/user/367108</a></div><div><a href="http://linkedin.com/in/jeffrgreenberg" target="_blank">linkedin.com/in/jeffrgreenberg</a></div>
<div><a href="http://accidentalcoder.com" target="_blank">accidentalcoder.com</a> / <a href="http://ayendesigns.com" target="_blank">ayendesigns.com</a></div><div>@accidentalcoder</div>
</div></div></div></div></div></div>