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

No obvious way to name autocomplete input #50

Open
six8 opened this issue Feb 25, 2012 · 1 comment
Open

No obvious way to name autocomplete input #50

six8 opened this issue Feb 25, 2012 · 1 comment
Assignees
Milestone

Comments

@six8
Copy link

six8 commented Feb 25, 2012

You can't specify the name for the input field with the normal autocomplete options.

It would be nice to do:

$autocomplete = $.ninja.autocomplete({name: 'q'})

However this just puts the name on the wrapping span.

Currently you have to do the following which is neither obvious or convenient:

$autocomplete.find('input').attr('name', 'q')
@ghost ghost assigned uipoet Feb 26, 2012
@uipoet
Copy link
Member

uipoet commented Feb 26, 2012

Good point. I think the best solution will be to accept an array of attributes as an option and pass them all through to the input, like how we pass through css and html in other areas:

$autocomplete = $.ninja.autocomplete({
  attr: {
    name: 'q'
  }
}

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