[Skip to main content](#vessel-content)

#   Disable enter on checkout page

##

- **[startpoint](/forum/user/14210-startpoint "View startpoint's Profile")**
- [![startpoint's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14210-startpoint "View startpoint's Profile") Topic Author
- [ Offline](/forum/user/14210-startpoint)

Less More

- Posts: 12
- Thank you received: 0
-
-

6 years 1 day ago [\#326153](#326153) by [startpoint](/forum/user/14210-startpoint "View startpoint's Profile")  *[Disable enter on checkout page](/forum/27-checkout/901261-disable-enter-on-checkout-page#326153 "-- HikaShop version -- : 4.4 -- Joomla version -- : 3.9.22 -- PHP version -- : 7.3  I create custom shipping method. It contains form which show on checkout page. After filled field and then press a key 'enter' the filled value is cleared. How to disable update on enter for shipping method block? The shipping value will be updated after trigger click on radio button only.")* was created by *[startpoint](/forum/user/14210-startpoint "View startpoint's Profile")*

-- HikaShop version -- : 4.4
-- Joomla version -- : 3.9.22
-- PHP version -- : 7.3

I create custom shipping method.
It contains form which show on checkout page.
After filled field and then press a key 'enter' the filled value is cleared.
How to disable update on enter for shipping method block?
The shipping value will be updated after trigger click on radio button only.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTI2MS1kaXNhYmxlLWVudGVyLW9uLWNoZWNrb3V0LXBhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86575
- Thank you received: 14318
-
-

6 years 21 hours ago [\#326155](#326155) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Disable enter on checkout page](/forum/27-checkout/901261-disable-enter-on-checkout-page#326155 "-- HikaShop version -- : 4.4 -- Joomla version -- : 3.9.22 -- PHP version -- : 7.3  I create custom shipping method. It contains form which show on checkout page. After filled field and then press a key 'enter' the filled value is cleared. How to disable update on enter for shipping method block? The shipping value will be updated after trigger click on radio button only.")*

Hi,

In the file media/com_hikashop/js/checkout.js you have the function handleEnter which does that.
In the view file checkout / show.php that you can edit via the menu Display&gt;Views, you can see that this handleEnter function is called for each block displayed on the checkout.
So you could add a condition there to remove the call to handleEnter so that it is not initialized on the fields of the shipping block.
Now, in the refreshBlock and submitBlock functions of the checkout.js you also have a call to handleEnter in order to reattach the listener to the inputs when a block of the checkout is refreshed in AJAX.
So I think a simpler approach would be to edit checkout / show.php and keep the calls to handleEnter and add additional javascript to redefine the handleEnter function like that: Code:

&lt;script&gt; window.checkout.handleEnter = function(task, step, pos) { ... copy / paste the code from the original handleEnter function and adapt it to skip when the block is the shipping block... } &lt;/script&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTI2MS1kaXNhYmxlLWVudGVyLW9uLWNoZWNrb3V0LXBhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.060 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
