andrew_x_childr
Apprentice

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

Hi Claire,

If you have set up the button settings exactly as shown in Manfred's example, the only other thing I can think of that might be causing problems is if you don't have the custom CSS set up correctly.  Here's a screenshot of what it should look like:

I have not tested it with a repeating section, so in order to be sure it works I would first test my form without a repeating section and make sure I can get this behavior to work, then add the repeating section back in (or revert to a version of the form with the repeating section).

Does this help?

Reply
claire_allen
Apprentice

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

Hi Andrew,

I've made sure that I followed the instructions given and that my CSS looks the same, and when I go into the form and Publish I can still press enter and the form saves,

One questions is what should the name of the button be as the instructions shows a Green line on that item but no name, should the button be named for this to work?

Sorry I cannot seem to get this to work for me :-(

0 Kudos
Reply
andrew_x_childr
Apprentice

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

What worked for me was to use a single space as the button name.

0 Kudos
Reply
claire_allen
Apprentice

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

Hi Andrew,

Just had another go, wont let this get me!

One thing I was doing wrong which clearly said in the instructions was but the button above the Submit button.

Works on trying to press enter in a repeating section.

Thank you all so much for your help :-)

Reply
suneelprakash7
Scholar

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

This works only one time when i open the new form for the first time.Once the form is closed and when i open a 2nd new form again and hit ENTER it's getting saved. Any Ideas for the error ??

I am using Nintex forms for office 365.

0 Kudos
Reply
shaunlub
Scout

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

How is the second form being opened? From the first form? In a new window or a new tab?

0 Kudos
Reply
suneelprakash7
Scholar

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

Hello Shaunlab..Thanks for your response..Below are the results for the above code.

  1. If i am opening the newform.aspx page in the same tab and after I do the look up column which is a required field on the form, it's working perfectly and if I scroll down the form for the bottom and again hit enter the form is being saved which shouldn't happen ideally.
  2. If I am opening the newform.aspx page in the new tab and after I do the look up of one column which is a required field on the form and hit enter it's getting saved which shouldn't happen.
  3. If I am opening the second item after this getting saved the functionality is not working after I do the look up column which is a required field on the form it's not working.
0 Kudos
Reply
shaunlub
Scout

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

Hi,

How is the second form opened? By a manual mouse click on a link OR are you using the URL to loop back?

I use the solution mentioned above, but always back out of the form to let users re-open the form afresh, as required. I usuall use the &Source= at the end of the new form link to make it loop back to the starting web page (which in my case is often the site home page) rather than the list itself.

Javascript really needs to have a new freshly-loaded page fore everything to run again from scratch - which is likely the problem you are having with following forms.

0 Kudos
Reply
d_sutton
Novice

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

Hi, 

I have tried your solution, unfortunately it redirects me when pressing "enter" in a repeating section. 

i'm curious if this is an on prem solution vs online? as i'm using office 365

thanks 

danielle

0 Kudos
Reply
marktucker
Novice

Re: How can I stop a Form from Saving when the Enter key is hit?

Jump to solution

I had the same problem, and I just added a checkbox to the form, added a rule for the two buttons Submit and Cancel that if the box wasn't checked, the buttons are disabled. If they hit enter, nothing happens until they are finished and check the box.

0 Kudos
Reply