Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDB Stepper Form Enter Key Pressed Issues

athleticssoftware pro asked 4 years ago


Expected behavior We are using an MDB Stepper inside of a form. When an input control has focus and a user hits enter on their keyboard the stepper should not go backwards to the last (previous) step.

i.e. When the user presses the enter key while inside an input control it should do nothing unless that input control is a calendar or a select.

Actual behavior In our stepper for some reason, when an input control has focus and the user presses enter on their keyboard the stepper goes backwards to the last (previous) next step. This happens even if the form does not meet validation requirements. When a user tabs into an input control that happens to be a MDB calendar and hits enter it doesn't show the calendar modal and it returns back one step.

Resources (screenshots, code snippets etc.) I can share the code in part or privately if requested (there is a lot of it).


Tomek Makowski staff commented 4 years ago

Hi, could you show me your code in the snippet code editor?

Snippet code editor: https://mdbootstrap.com/snippets/

Regards


athleticssoftware pro commented 4 years ago

Sure can. I won't be able to send it until next week though (we have limited hours because of Covid19).


Tomek Makowski staff commented 4 years ago

Ok, so I'm waiting


athleticssoftware pro commented 4 years ago

Hi Tomek, is there a way to send you a direct message with a link to the snippet with our code in it? Or is that something you can already see on our account?


Tomek Makowski staff commented 4 years ago

just create a snippet here:

https://mdbootstrap.com/snippets/

And then paste your code into this snippet, copy the URL link and send this URL here

Regards


athleticssoftware pro commented 4 years ago

Sorry for the delay. I pasted the code here: https://mdbootstrap.com/snippets/jquery/athleticssoftware/2503259


Krzysztof Wilk staff answered 4 years ago


Hi @athleticssoftware!

You have to add .linear class to your treeview ul (second line in the snippet). Also, you have to add the required attribute to all of your required inputs, so your stepper won't go into another step if previous values are empty :)

Best regards



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.0
  • Device: Desktop
  • Browser: FF 80.x & Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No