Javascript Code Issue with Bootstrap Tags Input

sedang Berlangsung Dipasang 5 tahun yang lalu Dibayar saat pengiriman
sedang Berlangsung Dibayar saat pengiriman

I've got a tagsinput field with typeahead and everything is working fine. I can type in a value and if any of the typeahead results come up I can select and press enter to have it added to the tag input field.

However, when I enter a tag value that isn't in the typeahead list and press enter, the form is submitted. I want to prevent this behavior and have tried a few methods and just can't seem to get it to work. I've attached a screenshot of the javascript code I have right now. The issue with this code is that, while it does prevent the enter key from submitting the form, it also prevents the enter key from adding the tag.

What I need is to have the enter key work to create the tag but not submit the form. I need this code fix urgently so today if at all possible. Thank you!

JavaScript jQuery / Prototype

ID Proyek: #17148797

Tentang proyek

11 proposal Proyek online Aktif 5 tahun yang lalu

11 freelancer rata-rata menawar $22 untuk pekerjaan ini

shayona163

hello sir i am expert in javascipt i am able to do this work you will satisfy with my work i can do this work asap this simple work for asap thank you

$25 USD dalam 1 hari
(68 Ulasan)
5.7
bitterpotato

Can be easily and quickly fixed.

$20 USD dalam 1 hari
(14 Ulasan)
3.5
projeshromi

I can do this by 1 day after project been assigned.. done this kind of job frequently.. experienced developer of ui/ux industry

$17 USD dalam 1 hari
(1 Ulasan)
2.5
sdad504

I am a web developer and UI developer as well.I have done many projects related to jquery,css3,bootstrap etc.,.I can definitely fix your issue.

$15 USD dalam 1 hari
(0 Ulasan)
0.0
anusetia

I got your issue and can try to fix it

$30 USD dalam 1 hari
(0 Ulasan)
0.0