0

Brand new to web.py

I've set up a simple form with textboxes and a submit button, pretty much like the example shown here: http://webpy.org/src/todo-list/0.3

Is there anyway I can prevent submission of the entries when the enter key is pressed? (ie: only submit when the button is clicked with the mouse?)

My problem is that in my application a user will enter values in the text box with a barcode scanner, which automatically adds a cartridge return to the end of the value. Since the user will have to enter multiple textboxes on a form, this is problematic.

SheetJS
  • 22,470
  • 12
  • 65
  • 75
  • This is a duplicate of http://stackoverflow.com/questions/905222/enter-key-press-event-in-javascript – Brent Washburne Jun 07 '13 at 17:44
  • Many thanks for the link. Unfortunately, my knowledge of javascript is non-existent, so I'm somewhat unclear as to how to apply this to web.py. I'll read some more. – sd_mike Jun 07 '13 at 19:05

1 Answers1

-1

If you change the button from a submit button on the form to a html input button should do what you are looking for.

Sean McCully
  • 1,122
  • 3
  • 12
  • 21