02.02.2022 14:46
|
|
spike77
Name: Manfred
30.04.2015
Posts: 706
|
Search++ lock enter key when input field is empty
Pressing the enter key in the empty input field all the products in the shop will be listed .... is it possible to block it somehow?
It would also be good to set an autofocus for the input field. But autofocus="" doesn't work.
Last change: 02.02.2022 14:48
|
|
02.02.2022 20:35
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25938
|
Aw: Search++ lock enter key when input field is empty
url?
|
|
03.02.2022 08:14
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25938
|
Aw: Search++ lock enter key when input field is empty
1.
modules\mod_addon_search_plus_plus\tmpl\default.php
row 27
<input
change to
<input required
2. focus
After click to your search button
Need add focus to your input search (javascript)
Last change: 03.02.2022 08:17
|
|
03.02.2022 08:24
|
|
spike77
Name: Manfred
30.04.2015
Posts: 706
|
Aw: Search++ lock enter key when input field is empty
1. works! Thankyou
2. could you please describe it in a bit more detail. where should I add the <script>, what should the <script> look like? maybe like this:
focusMethod = function getFocus() {
document.getElementById("myButton").focus();
}
<button type="button" onclick="focusMethod()">Search</button>
Last change: 03.02.2022 08:25
|
|
03.02.2022 08:38
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25938
|
Aw: Search++ lock enter key when input field is empty
modules\mod_addon_search_plus_plus\js\module.js
after row 37
jQuery('.aikon-search-dir-right i').on('click', function(){
jQuery('.aikon-search .addon_search_plus_plus input#jshop_search').focus();
});
Last change: 03.02.2022 08:39
|
|
03.02.2022 08:43
|
|
spike77
Name: Manfred
30.04.2015
Posts: 706
|
Aw: Search++ lock enter key when input field is empty
This is the best support, i´ve ever seen. Works perfect now! Thankyou very much!
|
|