I’m using Wix Forms. I want to disable key press “enter” to submit. My form has required fields and non-required field. When the customer fill up the required fields and then accidentally pressed enter, it will be submitted.
Hello テテェトズン,
you have input-fields in your form right?
When you klick on each of this forms, you can see all coding options of these input-field (when dev-mode & developer-mode) is activated.
You will need something like this of code, to solve your issue…
export function input1_keyPress(event) {
if (event.key === "Enter") { } //<---- What shall happen when ENTER is pressed???
else{ } //<--- if key not ---> "ENTER", what shall happen now?
}
I don’t think you can use code for Wix form. テテェトズン, why not create a custom form using a database (no code required)? You can go to this article about creating a custom form using user inputs & a database. https://support.wix.com/en/article/creating-a-form-with-user-input-elements
Arthur
Actually what Arthur said is correct. I could not edit the code behind Wix Form.
I did the code that russian-dima said already and yes the code executed when I press enter as well as the function of submitting the form (default of Wix Form) also get executed.
So, my only choice could be custom form then.
The other way I was trying was to execute a confirm light box before submitting but that too no luck.
Thanks for the response.
Hi everyone
You cannot interact with Wix Forms with code as with any other app from the Marketplace, you can create a custom form, pressing Enter to submit custom forms in not configured by default (disabled).
Ahmad
@Ahmad congratulation to C😉M
Like i assumed, there are some updates going on
Thank you russian-dima
You’re on the right way, too.
THX!
Has anyone found a solution for this? I am having the same issue with my lightbox form.