Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formtastic and id_element #43

Open
jubari opened this issue Jan 11, 2016 · 1 comment
Open

Formtastic and id_element #43

jubari opened this issue Jan 11, 2016 · 1 comment

Comments

@jubari
Copy link

jubari commented Jan 11, 2016

Just a quick heads-up and suggestion for the readme:

Using :id_element => "#client_id" with formtastic will not yield the expected result (will not work).

The id_element has to be wrapped like this:

f.input :client_name, input_html: { data: { :id_element => "#client_id" } }, :as => :autocomplete,
        url: autocomplete_client_name_clients_path

Took me a few minutes to figure out, might help someone with the same problem.

@Aerlinger
Copy link

Thanks, this is a super important detail should definitely be in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants