Issue with form submission on click of "Enter" through keyboard

  • 5 September 2018
  • 8 replies
  • 1 view

Hi Team,

I have some specific validation before posting data to our database. I am using unbind/bind “click tap touchstart” to call a function for specific validation. The problem is, when user clicks “Enter” through keyboard, it doesn’t call the function. Can you please help me here to handle Enter keyword.

Thanks !!
Brijesh Singh


8 replies

Userlevel 5

Hey @bksingh

Are you using this script for your custom validation?

Hi @Kyle.C,

Yes, i am using the same but somehow, even if after e.preventDefault(), “Enter” key is submitting the form.

Please let me know if i can provide more information.

Thanks,
Brijesh Singh

Userlevel 5

Hmmm okay,

Could you provide a URL to the page please?

Hi @Kyle.C,

Please find the url:

https://landing.technologyevaluation.com/test-kentico-10/

Thanks,
Brijesh Singh

Hi @Kyle.C,

Wondering if you had some moment to check my link.

Thanks,
Brijesh Singh

Userlevel 5

Sorry it took me a few days to get back to this,

There are a couple errors I see in the console on your page, I recommend correcting those if you can.

But specifically regarding the script for custom validation, could you make sure it is placed in the “Before Body End Tag” position? I’m wondering if you currently have the script placed in the “After Body Tag” position, and we don’t want it in there 🙂

image

Hi @Kyle.C,

Thanks for your reply. I placed it before body end tag but still it is not working.

The console errors are trying to get some information about IP but it is not related to this issue.

Thanks,
Brijesh Singh

Hi @Kyle.C,

Any help would be highly appreciated.

Thanks,
Brijesh Singh

Reply