Multi-Step-Form-Js
Multi-Step-Form-Js copied to clipboard
Feature request: Multiple sets of control buttons
Someone asked me if it could be possible to add two sets of buttons for controlling the form process (next/prev buttons)
After a quick look I wondered if it could be done simply by removing the ".first()" call here
What do you think?
Just tested it and it works fine.
Edit: There seems to be a bug causing validation of next step when using the "submit/enter" key on keyboard. I will try to find where it comes from.
so just for my own understanding...a form could have 2 "next" buttons that act identically (for instance one on the top of the form one on the bottom)?
Exactly, for cases when the form is long enough to have scrolling required in a single step.
Okay so the problem is obviously caused by the fact that my first attempt (removing the .first()) call when finding the navigation, did register both and hence there are two handlers created.
Okay found a workaround, by only using the first registered button when using the key '13' (enter). Don't know if that's optimal though...
Do you think that would be useful/ a potential use case worthy of PR?
can i please get a sample on how to use this