Conditional Cart attributes displayed when only a specific product is in the cart

When a customer purchases a specific product, I want to collect specific information. I have used the card attribute tutorial linked below successfully, but it shows up for all products when placed in a cart. I only need it for a specific product.

https://community.shopify.com/c/shopify-design/cart-use-cart-attributes-to-collect-more-information/m-p/625858/highlight/true#M160616

When I use an if statement combined with a product.tag, the cart attributes no longer display for any products, even the one contained in with the if statement. See below.

{% if product.tags contains 'Test'%}

Rider Name

Rider Skill Level
Level 1
Level 2
Level 3

{% endif %}

I am using Ride version 15.3.0 as my theme. I’m not great with coding, but it seems like it should be pretty straight forward considering the block of code works as intended when not incorporated into the if statement. Can someone help me figure this out?

This might sound silly but worth a try.

{% if product.tags contains ‘Test’ %}

Add this, I have added a space after the word test. Shopify is somewhat strict when it comes to spaces and other punctuations.

If this does not work please check by logging out how test is displayed, so it is capitalised or Shopify converts to lowercase, may be.

Thanks for the response. I gave it a try with the space and still no luck. I also changed capitalization on the product.tags line. Something doesn’t seem right because I tried the if loop with product.id and product.handle and it still doesn’t work.