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

How to integrate jQuery.autocomplete #156

Open
entenbraten opened this issue Jul 15, 2013 · 0 comments
Open

How to integrate jQuery.autocomplete #156

entenbraten opened this issue Jul 15, 2013 · 0 comments

Comments

@entenbraten
Copy link

Hello,

I'd like to integrate jQuery.autocomplete for a formular input, which is validated by idealforms.
My code example:

<form id="mainform" class="mainform">
<div><label for="autocompleteinput">Input:</label><input id="autocompleteinput" name="autocompleteinput" type="text" placeholder="e.g. Input"/></div>
</form>

var $mainform = $('#mainform').idealforms({
'autocompleteinput': {
filters: 'required ajax',
data: { ajax: { url: 'myurl.php' } }
}}).data('idealforms');

$("#autocompleteinput").autocomplete(...);

if I type "xyz" into the autocompleteinput field, the jQuery autocomplete menu appears. I choose one value and the value of the autocompleteinput field is set to the choosen value. However, idealforms didn't notice that something was written into the input field. So the valdation fail.
My questions: How can i tell idealforms to check the current value, which was written into the input field via jQuery?

I tried to trigger an event, like keyup, blur, focus etc. on the input field: nothing. I tried to change the span class via jQuery to valid etc. Nothing works fine.
Any suggest, what I can do? I am looking for a method to tell idealform that there is a new value. fresh () etc. doesn't work either.

Thank you for any hint. :)

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

1 participant