This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

billy8046
billy8046

Does anyone know the best way to go about using jquery autocomplete or bootstrap typeahead with a database in October CMS. I've never really worked with a framework or cms before, so I'm still learning how to go about this sort of thing. I can do it using an array in javascript, but I don't know how to get the php output from my plugin to the code for handling the typeahead.

Scott
Scott

To grab your data from the database, you can use an Eloquent query from either a component or the PHP section of a page or partial. Eloquent has some handy helper methods to help you pass data to your javascript, specifically you might want to use the toJson() method.

billy8046
billy8046

Thanks! I'll have to get more familiar with Eloquent and how to use it in OctoberCMS.

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.