"Regular expression check" doesn't visible to single drop down list on backend

  • Posts: 382
  • Thank you received: 77
7 years 9 months ago #262632

-- HikaShop version -- : 2.6.4

Hi,

The "Regular expression check" doesn't visible to single drop down list on backend.

I use many item custom fields of this type and I have regular expressions to chek it. There is no problem on my frontend, but I cann't see my regular expessions on backend.

The same problem is in Hikashop 3.0.0

Best regards,

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 9 months ago #262653

Hi,

That's not a problem. It's done on purpose.
The goal of a regex check is that you can restrict what the customer can enter in the custom field.
If the custom field is a dropdown, you specify yourself what the customer can select and he can't select something you didn't add as a value of the custom field.
So there is no point in having a regex check. If you don't want the customer to select a value, simply don't add that value to the custom field.

So I don't see why you would need that ?

Please Log in or Create an account to join the conversation.

  • Posts: 382
  • Thank you received: 77
7 years 9 months ago #262731

Thank you, Nicolas, for your answer.

But, I really need this feature to prevent a user selecting the default options. Sometimes buyers are careless and forget to select the parameters of the product. It is about contact lenses.
I set the values:
Select the diopter
-1.5
-2.5
...
Then I check if the selected value is "Select the diopter" it means that the value is incorrect.

How it works you can see here: http://line22.ru/month/2313-purevision-multifocal-6-lenses . Try to add a product to cart.

And I ask to return this check for a single drop-down list so as it was in previous versions.

Best regards

Last edit: 7 years 9 months ago by Jerome. Reason: removing quote of Nicolas previous message

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 9 months ago #262778

Hi,

You can do that without a regex.
Simply set the custom field as required and leave the "value" input of the "Select the diopter" value empty and the system won't let the customer move forward unless he selects something else.

Please Log in or Create an account to join the conversation.

  • Posts: 382
  • Thank you received: 77
7 years 9 months ago #262814

nicolas wrote: Hi,

You can do that without a regex.
Simply set the custom field as required and leave the "value" input of the "Select the diopter" value empty and the system won't let the customer move forward unless he selects something else.


Thank you, Nicolas

I did that way because there was that feature and I was unpleasantly surprised, you have removed it.
Now I have to fix it for all of my fields. I can do it. I hope that no one else has done the same way.

Best regards

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 9 months ago #262815

Hi,

The fact that the regex field was displayed for dropdown custom fields was a bug, not a feature. And we've fixed it.
Each time someone has asked us on the forum how to do a "please select" choice for a dropdown, we've always told them to use the "required" mechanism, and never the regex field, which was only added last year.
As I said, there should be no reason to have that option for dropdowns.
Sorry that you have to redo your custom fields but we won't add that option to dropdowns.

Please Log in or Create an account to join the conversation.

  • Posts: 382
  • Thank you received: 77
7 years 9 months ago #262860

No problem, Nicolas. I still love HikaShop.

Good luck!

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum