How can I make a line item property required on a customer's website?

UPDATE: I got the issue resolved, but it is not a required field for some reason, I have added required class=required to the code but it is not working. Anyone know how to fix this? Thanks!

Hello I want to add a line item property for customers website URL.

I have created a snippet and added an ‘if’ ‘then’ code to the main product template to render the line item property, above the buy button. (See screenshots)

For whatever reason it is not rendering, I’m guessing something’s off with the if/then statement, I would like it to render whenever the products are part of a collection with the handle /collections/shopify

Here is the current code, can anyone give me the line of code to fix this? Thanks!