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

#   Check-out page login form validation issue

##

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

Less More

- Posts: 5
- Thank you received: 0
-
-

11 years 8 months ago -  11 years 8 months ago [\#191955](#191955) by [rajaswin](/forum/user/8782-rajaswin "View rajaswin's Profile")  *[Check-out page login form validation issue](/forum/27-checkout/875196-check-out-page-login-form-validation-issue#191955 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hi,  Check-out page login form validation isn't working, when we submit form without giving username/password, form submits without showing any warning message. We tried adding HTML5 required  attribute but that doesn't work as well. Please advice.  Thanks!!")* was created by *[rajaswin](/forum/user/8782-rajaswin "View rajaswin's Profile")*

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6

Hi,

Check-out page login form validation isn't working, when we submit form without giving username/password, form submits without showing any warning message. We tried adding HTML5 ***required***  attribute but that doesn't work as well. Please advice.

Thanks!!

Last edit: 11 years 8 months ago by [rajaswin](/forum/user/8782-rajaswin "View rajaswin's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTE5Ni1jaGVjay1vdXQtcGFnZS1sb2dpbi1mb3JtLXZhbGlkYXRpb24taXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

11 years 8 months ago [\#192002](#192002) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Check-out page login form validation issue](/forum/27-checkout/875196-check-out-page-login-form-validation-issue#192002 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hi,  Check-out page login form validation isn't working, when we submit form without giving username/password, form submits without showing any warning message. We tried adding HTML5 required  attribute but that doesn't work as well. Please advice.  Thanks!!")*

Hi,

The check is done on the PHP side and there should be an error message displayed on the page telling you that the password was empty on the page reload.
If you don't see it, it could be that your Joomla template is not displaying messages:
[ www.hikashop.com/support/support/documen...tibility-issues.html](https://www.hikashop.com/support/support/documentation/61-hikashop-compatibility-issues.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTE5Ni1jaGVjay1vdXQtcGFnZS1sb2dpbi1mb3JtLXZhbGlkYXRpb24taXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 5
- Thank you received: 0
-
-

11 years 8 months ago [\#192020](#192020) by [rajaswin](/forum/user/8782-rajaswin "View rajaswin's Profile")  Replied by *[rajaswin](/forum/user/8782-rajaswin "View rajaswin's Profile")* on topic *[Check-out page login form validation issue](/forum/27-checkout/875196-check-out-page-login-form-validation-issue#192020 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hi,  Check-out page login form validation isn't working, when we submit form without giving username/password, form submits without showing any warning message. We tried adding HTML5 required  attribute but that doesn't work as well. Please advice.  Thanks!!")*

This is your demo page,
[ demo.hikashop.com/index.php/en/hikashop/...checkout/step/step-2](http://demo.hikashop.com/index.php/en/hikashop/categories-listing/display-in-div-div/checkout/step/step-2)

Add a product to cart and goto checkout login page, don't give username/password, it just submits form but doesn't show any warning.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTE5Ni1jaGVjay1vdXQtcGFnZS1sb2dpbi1mb3JtLXZhbGlkYXRpb24taXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 8 months ago -  11 years 8 months ago [\#192048](#192048) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Check-out page login form validation issue](/forum/27-checkout/875196-check-out-page-login-form-validation-issue#192048 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hi,  Check-out page login form validation isn't working, when we submit form without giving username/password, form submits without showing any warning message. We tried adding HTML5 required  attribute but that doesn't work as well. Please advice.  Thanks!!")*

Hi,

To display a message when the login/password fields are empty, you can potentially edit the file "components/com_hikashop/controllers/checkout.php" and replace the function "after_login()" by: Code:

function after_login($success){ $user = JFactory::getUser(); $status = true; $app = JFactory::getApplication(); $user_id=$app-&gt;getUserState( HIKASHOP_COMPONENT.'.user_id' ); global $messDisplay; if(is_null($messDisplay)) $messDisplay = 0; else $messDisplay = 1; if(!$this-&gt;cart_update &amp;&amp; $user-&gt;guest &amp;&amp; empty($user_id)){ JPluginHelper::importPlugin('user'); $register=JRequest::getString('register',''); $action = JRequest::getString('login_view_action',''); if($action=='register' &#124;&#124; ($action!='login' &amp;&amp; !empty($register))){ $status = $this-&gt;_doRegister(); }else{ $login=JRequest::getString('login',''); if($action=='login' &#124;&#124; !empty($login)){ $status = $this-&gt;_doLogin(); }else{ $name = @$_REQUEST['data']['register']['email']; $username = JRequest::getVar('username', '', 'request', 'username'); if(!empty($name)){ $status = $this-&gt;_doRegister(); }elseif(!empty($username)){ $status = $this-&gt;_doLogin(); }elseif(empty($name) &amp;&amp; empty($username) &amp;&amp; $messDisplay == 0){ $app-&gt;enqueueMessage('PLEASE_FILL_LOGIN_FIELDS'); } } } if($status){ if($this-&gt;_getStep('address',$this-&gt;previous)!==false &#124;&#124; $this-&gt;_getStep('confirm',(int)$this-&gt;previous)===(int)$this-&gt;previous){ $status = false; } //try to auto select the address. If the address was selected and that the address is on the same step as the login, stay on the same page if(!$this-&gt;before_address()){ $status = false; } //try to auto select the shipping if the shipping view is not on the same step or if the address has been auto selected if(!$status &#124;&#124; $this-&gt;_getStep('shipping', $this-&gt;previous) !== false) { $this-&gt;before_shipping(); } $this-&gt;before_login(); } } return $status; }

Last edit: 11 years 8 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTE5Ni1jaGVjay1vdXQtcGFnZS1sb2dpbi1mb3JtLXZhbGlkYXRpb24taXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.059 seconds

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