Magento 2.1 - How can I remove the ability for a user to UNSELECT a swatch image?

Magento 2.1 - How can I remove the ability for a user to UNSELECT a swatch image?

I have all configurable products, I have created default simple product configurations for all configurable products. In the configurable product I have a double swatch configuration and if the user accidentally clicks twice on a swatch image, that option becomes UNSELECTED. I need to remove the ability for the user to UNSELECT any swatch, the configurable product must always have a swatch selected. The user can choose different configurations, and move about, but should never be allowed to select nothing.

I have configured default configurations on all configurable products and I want the swatches to behave like radio buttons in that the user always has 1 of each selected. We have a total of 2 possible swatches. FRAME color and LENS color; one of each must always be selected.
LVL 1
sqlagent007Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sqlagent007Author Commented:
I forgot to add the version...We are using CE.

Wrangler jeans does a good job of this and I know they are EE, but I have to believe there is a way to do this in CE.

Notice on this page you can never UNSELECT a jean COLOR
https://www.wrangler.com/shop/men-jeans-by-fit-slim/wrangler-retro-jean-slim-straight?variationId=88MWZTB#hero=0
0
Php_expertCommented:
Hi,

I think you have to play around with JS to have default selection on PDP page load.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sqlagent007Author Commented:
Thanks, that is what we ended up with.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Magento

From novice to tech pro — start learning today.