Basically, I am using best_in_place in my rails webapp to let users edit their profile info in place. The thing is, I would like users to be presented with a typeahead form for certain entries.. Here's what I'm working with:
<p>College/University: <input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="8" data-source='["University of Pennsylvania","Harvard","Yale","Princeton","Cornell","Brown","Columbia","Dartmouth"]'></p>
This gives me a working form box with typeahead. However, I want to be able to wrap this in best_in_place with something like
<%= best_in_place @student, :education %>
so that users only see the typeahead form when they click on the text, and upon clicking away from the box or hitting enter the selection is stored in the database.
Is there a reasonably easy way to do this?