Hi,
You have 2 options:
- There is no setting to restrict a custom field being displayed or not based on an option. However, it's possible to hide/display the custom field when the option is changed by adding some custom javascript to the product page.
In your javascript ( which you can add via a view override), you can implement the hkContentChanged event:
www.hikashop.com/support/documentation/6...tml#hkContentChanged
And in it, a bit of javascript :
www.tutorialspoint.com/How-to-hide-HTML-element-with-JavaScript
So if you're a developer, this is possible. However, you can't turn on the "required" setting of the field. Otherwise, it will forbid the add to cart when the custom field is not displayed by the javascript and thus empty. So if you need the field to be filled, you would need to add a check in your javascript too.
- A cleaner solution would be to not use an option and a custom field, but two custom fields. That way, you can rely on the "display limited to" setting of the second custom field to display it only when the first one is in a specific value. That way, no custom code to do.
The limitation here is that you can't add extra fees to the product based on what is selected in a custom field. I suppose that's what you want to use the option for. However, you can use this plugin (
www.hikashop.com/marketplace/product/148...ce-calculations.html
) to do it.