Hello Philippe,
Yeah, it's hard to explain. There is more detail.
I created around 20 custom fields to get phone numbers. I configured these fields as NOT required on the backend configuration.
In the front-end, on the product page, I created a custom version of the view "product/show_quantity". By default, I only show the first custom field. If the user need more, he can change the quantity. If he choose 3 per example, I show two more custom fields.
So, I only want custom fields that are shown to be required. It's why I didn't set these custom fields as required into the custom field configuration. I do it manually in my custom version of "product/show_quantity".
So, when I set a field to be required:
- I add an asterisk at the end of the textbox;
- I add the custom field name into an array;
When all my custom fields are in the array, I assign this array to the following array variable:
window.hikashopFieldsJs['reqFieldsComp']['item']
With that, when I clic add to cart button, if one field are not feeded, Hikashop show me an alert about the required field.
It was working well on Hikashop 3, but it is no more working with Hikashop 4.4.0.
How can I achieve this?
BTW, the "HikaShop Cart notification Plugin" is disabled.
Thanks