Page 1 of 1
Admin: how to sumbit search form by pressing ENTER
Posted: Wed Nov 15, 2017 4:17 pm
by arthur
As this is my first time with OpenCart, I'm looking for a lot of improvements. I've noticed that ENTER button has no action on products search form (back-end). After I enter a phrase, that would be very convenient to press Enter and submit the query. But it ain't working. So I need to move my mouse on button "Filter".
v2.3.0.2
Re: Admin: how to sumbit search form by pressing ENTER
Posted: Wed Nov 15, 2017 5:54 pm
by paulfeakins
Ok so are you a developer?
This would need you to add a JavaScript listener on to those fields and then trigger the filter button event.
Re: Admin: how to sumbit search form by pressing ENTER
Posted: Wed Nov 15, 2017 6:42 pm
by arthur
paulfeakins wrote: ↑Wed Nov 15, 2017 5:54 pm
Ok so are you a developer?
This would need you to add a JavaScript listener on to those fields and then trigger the filter button event.
I wouldn't say that I'm a developer, I just want to have done it by myself as much as possible.
Re: Admin: how to sumbit search form by pressing ENTER
Posted: Thu Nov 16, 2017 6:19 pm
by paulfeakins
Then this is a good starting point:
https://stackoverflow.com/questions/706 ... nput-field
Code: Select all
$(".input1").on('keyup', function (e) {
if (e.keyCode == 13) {
// Do something
}
});
You'll need to change it to work with those fields and you'll need to change // Do something to call the function that is called when the Filter button is pressed.
Good luck

Re: Admin: how to sumbit search form by pressing ENTER
Posted: Mon Jul 08, 2019 10:07 pm
by dutchohn
For anyone finding this post and looking for a ready-made solution, there is an extension available:
viewtopic.php?t=203130