You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I check html code in inspect element , althought the first and second
inputs have event and work correctly,the third row(input) does not have any
event to show autocomplete suggestion after changing input , .
On Sun, Apr 5, 2020, 8:19 PM Iman Heydari ***@***.***> wrote:
even if we have 10 options when we arrive to third row ,autocomplete
suggestion is still not working .
On Sun, Apr 5, 2020, 8:10 PM Patrick Groot ***@***.***>
wrote:
> The only thing i can come up with is that apple is already selected from
> the list...
>
> Never used this field before but i was looking for exactly this.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#105 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHP2L2UBEHNDQOCMGPVVVLTRLCQ6ZANCNFSM4MAUMUHQ>
> .
>
Hi @tw2113 , hi @iranimij ,
I have the same problem, any clue to solve this ?
I saw the same thing than @iranimij, after the second row, the event is not present.
Also, the two first rows doesn't have "id" neither "name whereas the third one and more have an id and a name but null.
I keep searching and I could see that there is no problem when the field is not repeatable and inside a repeatable group.
Maybe thanks to the ajax loading of the repeatable group ?
The repeatable field doesn't have ajax reloading, and so the javascript event is not attached to the added field.
The second row have the event because it is already present on document.ready (hidden but present). but the third row and more are added with javascript without reloading and the event is not attached.
I can see what is the problem but I don't have the necesary knowledge in javascript to solve it.
I was able to get it working by modifying the script portion of the autocomplete_cmb2_render_autocomplete() function. Basically, all of the js code after jQuery(document).ready(function($) { is moved into a function that gets fired on document.ready, and then refired when the Add Row button for the field gets clicked. I've attached my modified version of the file. autocomplete-field-type.php.zip
Activity
pgroot91 commentedon Apr 5, 2020
The only thing i can come up with is that apple is already selected from the list...
Never used this field before but i was looking for exactly this.
iranimij commentedon Apr 5, 2020
iranimij commentedon Apr 5, 2020
iranimij commentedon Apr 6, 2020
in this picture you see the third row does not have any events.
tw2113 commentedon Apr 6, 2020
@johnsonpaul1014 I think this is your autocomplete plugin originally. Do you have any thoughts or insights on what's going on?
@iranimij Are you seeing this with classic editor, gutenberg editor, or both?
iranimij commentedon Apr 6, 2020
Pierronimo commentedon Jun 5, 2020
Hi @tw2113 , hi @iranimij ,
I have the same problem, any clue to solve this ?
I saw the same thing than @iranimij, after the second row, the event is not present.
Also, the two first rows doesn't have "id" neither "name whereas the third one and more have an id and a name but null.
tw2113 commentedon Jun 5, 2020
I don't have any new insights on this one, sorry.
Pierronimo commentedon Jun 5, 2020
Ok, thanks for answering.
I keep searching and I could see that there is no problem when the field is not repeatable and inside a repeatable group.
Maybe thanks to the ajax loading of the repeatable group ?
The repeatable field doesn't have ajax reloading, and so the javascript event is not attached to the added field.
The second row have the event because it is already present on document.ready (hidden but present). but the third row and more are added with javascript without reloading and the event is not attached.
I can see what is the problem but I don't have the necesary knowledge in javascript to solve it.
Maybe with @iranimij or @johnsonpaul1014 we can solve it ?
pixelwatt commentedon Dec 9, 2020
I was able to get it working by modifying the script portion of the autocomplete_cmb2_render_autocomplete() function. Basically, all of the js code after
jQuery(document).ready(function($) {is moved into a function that gets fired on document.ready, and then refired when the Add Row button for the field gets clicked. I've attached my modified version of the file.autocomplete-field-type.php.zip
Pierronimo commentedon Jan 25, 2021
Hi @pixelwatt.
I just tried it and it works good for me too, nice job !
Thanks a lot !