Code Monkey home page Code Monkey logo

formtastic_jrails_autocomplete's Introduction

Formtastic jRails autocomplete

An extension for Formtastic1 to automagically support fields with auto completion, using jrails_auto_complete gem2 (unobtrusive javascript).
Should work also with other autocomplete plugins (FormBuilder must respond to text_field_with_auto_complete method).

Usage example

<% semantic_form_for @user do |form| %>
  <% form.inputs do %>
    <%= form.input :name, :as => :autocomplete, :min_length => 3 %>
  <% end %>
<% end %>

Classic AJAX version (using other autocomplete plugin)

<% semantic_form_for @user do |form| %>
  <% form.inputs do %>
    <%= form.input :name, :as => :autocomplete, :url => autocomplete_task_name_path() %>
  <% end %>
<% end %>

Dependencies

You must have the formtastic gem added to your application + an autocomplete gem/plugin present and the :defaults javascript must be included in your layout.

Credits

Thanks to Paul Smith for the original idea

Found a Bug?

Please direct all queries to the issue tracker:

http://github.com/michelefranzin/formtastic_jrails_autocomplete/issues

References

1 Formtastic @ GitHub

2 JRails AutoComplete @ GitHub

Copyright

Copyright © 2010 Michele Franzin. See LICENSE for details.

formtastic_jrails_autocomplete's People

Contributors

elandesign avatar faulkner avatar fuzziness avatar

Stargazers

Gavin Daly avatar  avatar Ryan Duryea avatar Kyle Welsby avatar Rodrigo Panachi avatar  avatar Colin Schlueter avatar

Watchers

 avatar James Cloos avatar

Forkers

faulkner

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.