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

#   Validation on required custom fields

##

- **[stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")**
- [![stuart@steedman.co.za's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar38146.jpg)](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile") Topic Author
- [ Offline](/forum/user/38146-stuart-steedman-co-za)

Less More

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

10 years 5 months ago [\#243606](#243606) by [stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")  *[Validation on required custom fields](/forum/27-checkout/885188-validation-on-required-custom-fields#243606 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.15 -- Browser(s) name and version -- : Firefox 47.0 -- Error-message(debug-mod must be tuned on) -- : Validation enqueue messages  We have a few custom fields that are required, under the Order type. They are all assigned to different Categories and do show up correctly according to the different products in your cart.  &#42; Wine Collection Date (Wine Category) - Required  &#42; Platters Collection Date (Platters Category) - Required  But, when one only has Wine products in your cart for instance, and importantly you disable Javascript in your browser and then submit, Hikashop comes back and tells you to please select a &quot;Platters Collection Date&quot;, but this custom field isn't even visible on the checkout form. So we were forced to make all our custom fields NOT required and add our own Javascript validation on top with overrides. But for people that don't have Javascript enabled, those fields don't validate client side and Hikashop will then allow empty submits.  We did uopgrade Hikashop to the latest version (2.6.3), but this issue still persisted.  Does anyone know of a fix for this?")* was created by *[stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6.15
-- Browser(s) name and version -- : Firefox 47.0
-- Error-message(debug-mod must be tuned on) -- : Validation enqueue messages

We have a few custom fields that are required, under the Order type. They are all assigned to different Categories and do show up correctly according to the different products in your cart.

- Wine Collection Date (Wine Category) - Required
- Platters Collection Date (Platters Category) - Required

But, when one only has Wine products in your cart for instance, and importantly you disable Javascript in your browser and then submit, Hikashop comes back and tells you to please select a "Platters Collection Date", but this custom field isn't even visible on the checkout form. So we were forced to make all our custom fields NOT required and add our own Javascript validation on top with overrides. But for people that don't have Javascript enabled, those fields don't validate client side and Hikashop will then allow empty submits.

We did uopgrade Hikashop to the latest version (2.6.3), but this issue still persisted.

Does anyone know of a fix for this?

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

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

Less More

- Posts: 4820
- Thank you received: 652
-
-

10 years 5 months ago -  10 years 5 months ago [\#243811](#243811) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Validation on required custom fields](/forum/27-checkout/885188-validation-on-required-custom-fields#243811 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.15 -- Browser(s) name and version -- : Firefox 47.0 -- Error-message(debug-mod must be tuned on) -- : Validation enqueue messages  We have a few custom fields that are required, under the Order type. They are all assigned to different Categories and do show up correctly according to the different products in your cart.  &#42; Wine Collection Date (Wine Category) - Required  &#42; Platters Collection Date (Platters Category) - Required  But, when one only has Wine products in your cart for instance, and importantly you disable Javascript in your browser and then submit, Hikashop comes back and tells you to please select a &quot;Platters Collection Date&quot;, but this custom field isn't even visible on the checkout form. So we were forced to make all our custom fields NOT required and add our own Javascript validation on top with overrides. But for people that don't have Javascript enabled, those fields don't validate client side and Hikashop will then allow empty submits.  We did uopgrade Hikashop to the latest version (2.6.3), but this issue still persisted.  Does anyone know of a fix for this?")*

Hello,

Can you provide a **screenshot** of your two Custom field **back end** configuration ?
Because, from what I know I don't see where the issue come from.

Awaiting news from you.

Regards

Last edit: 10 years 5 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

- **[stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")**
- [![stuart@steedman.co.za's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar38146.jpg)](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile") Topic Author
- [ Offline](/forum/user/38146-stuart-steedman-co-za)

Less More

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

10 years 5 months ago [\#244052](#244052) by [stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")  Replied by *[stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")* on topic *[Validation on required custom fields](/forum/27-checkout/885188-validation-on-required-custom-fields#244052 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.15 -- Browser(s) name and version -- : Firefox 47.0 -- Error-message(debug-mod must be tuned on) -- : Validation enqueue messages  We have a few custom fields that are required, under the Order type. They are all assigned to different Categories and do show up correctly according to the different products in your cart.  &#42; Wine Collection Date (Wine Category) - Required  &#42; Platters Collection Date (Platters Category) - Required  But, when one only has Wine products in your cart for instance, and importantly you disable Javascript in your browser and then submit, Hikashop comes back and tells you to please select a &quot;Platters Collection Date&quot;, but this custom field isn't even visible on the checkout form. So we were forced to make all our custom fields NOT required and add our own Javascript validation on top with overrides. But for people that don't have Javascript enabled, those fields don't validate client side and Hikashop will then allow empty submits.  We did uopgrade Hikashop to the latest version (2.6.3), but this issue still persisted.  Does anyone know of a fix for this?")*

Hi, here are two screenshots.

http://i.imgur.com/KPj65vj.png?1
http://i.imgur.com/7KQYSAn.png?1

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTE4OC12YWxpZGF0aW9uLW9uLXJlcXVpcmVkLWN1c3RvbS1maWVsZHM/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: 86587
- Thank you received: 14325
-
-

10 years 4 months ago [\#244059](#244059) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Validation on required custom fields](/forum/27-checkout/885188-validation-on-required-custom-fields#244059 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.15 -- Browser(s) name and version -- : Firefox 47.0 -- Error-message(debug-mod must be tuned on) -- : Validation enqueue messages  We have a few custom fields that are required, under the Order type. They are all assigned to different Categories and do show up correctly according to the different products in your cart.  &#42; Wine Collection Date (Wine Category) - Required  &#42; Platters Collection Date (Platters Category) - Required  But, when one only has Wine products in your cart for instance, and importantly you disable Javascript in your browser and then submit, Hikashop comes back and tells you to please select a &quot;Platters Collection Date&quot;, but this custom field isn't even visible on the checkout form. So we were forced to make all our custom fields NOT required and add our own Javascript validation on top with overrides. But for people that don't have Javascript enabled, those fields don't validate client side and Hikashop will then allow empty submits.  We did uopgrade Hikashop to the latest version (2.6.3), but this issue still persisted.  Does anyone know of a fix for this?")*

Hi,

I found the issue.
Add the code: Code:

if(is_null($oldData)) $oldData = new stdClass(); $cart = $this-&gt;initCart(); $oldData-&gt;products = $cart-&gt;products;

before the code: Code:

$orderData = $fieldClass-&gt;getInput('order',$oldData,!$this-&gt;cart_update);

in the file components/com_hikashop/controllers/checkout.php and that should fix the problem.

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

- **[stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")**
- [![stuart@steedman.co.za's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar38146.jpg)](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile") Topic Author
- [ Offline](/forum/user/38146-stuart-steedman-co-za)

Less More

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

10 years 4 months ago [\#244205](#244205) by [stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")  Replied by *[stuart@steedman.co.za](/forum/user/38146-stuart-steedman-co-za "View stuart@steedman.co.za's Profile")* on topic *[Validation on required custom fields](/forum/27-checkout/885188-validation-on-required-custom-fields#244205 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.15 -- Browser(s) name and version -- : Firefox 47.0 -- Error-message(debug-mod must be tuned on) -- : Validation enqueue messages  We have a few custom fields that are required, under the Order type. They are all assigned to different Categories and do show up correctly according to the different products in your cart.  &#42; Wine Collection Date (Wine Category) - Required  &#42; Platters Collection Date (Platters Category) - Required  But, when one only has Wine products in your cart for instance, and importantly you disable Javascript in your browser and then submit, Hikashop comes back and tells you to please select a &quot;Platters Collection Date&quot;, but this custom field isn't even visible on the checkout form. So we were forced to make all our custom fields NOT required and add our own Javascript validation on top with overrides. But for people that don't have Javascript enabled, those fields don't validate client side and Hikashop will then allow empty submits.  We did uopgrade Hikashop to the latest version (2.6.3), but this issue still persisted.  Does anyone know of a fix for this?")*

Awesome, thank you, that did the trick.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTE4OC12YWxpZGF0aW9uLW9uLXJlcXVpcmVkLWN1c3RvbS1maWVsZHM/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.054 seconds

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