0
votes

I'm new the Drupal, and I'm using Drupal 7.

I've created a content type called "Travel Story", Here I've input field called visited country. I want to provide list countries name in the auto complete format by fetching through JSON. (like jquery auto complete )

as well I dont want to do this by adding all country name as a vocabulary terms, and making the input field as term reference in the content type.

How can we achive this or is there any way to use jquery auto complete inside content type??

Thanks in Advnce!!

1

1 Answers

0
votes

It's possible to implement autocomplete on text field using #autocomplete_path in your hook_form(). You can already have a pretty good idea of what you could do by reading this article.

In the "Make a call to the Database" section, you just don't need to do a DB query but a call to your API or whatever that sends back some JSON data.

Good luck :-)