Cart page cannot get value from dropdown liquid code (product page)

I have coded 2 custom liquid dropdown list (Design Type & Placement) snippets on the product page. Used the

1 Like

Hello @EmbroiGift ,

Your select box is outside the form tag.

Keep them inside the form tag and it will work as you need.

Thanks

Hello @EmbroiGift

Step 1: Update Your Product Page

Wrap each

Sorry @devcoders but I’m not agree with you.

We don’t need any extra input tag.

We don’t need any extra form tag as we already have in our PDP page.

Also we don’t need any extra code in cart page, cart default code can manage it.

@EmbroiGift if you have any confusion you can check this https://ui-elements-generator.myshopify.com/pages/line-item-property

Thanks

1 Like

Hello @Guleria

Yes, we don’t want to use a new form tag. We need to add it to the existing one. The example was only given to help them understand.

Yes, thanks tomorrow i’ll test

Additional, how to set it required option like variant color, quantity, number of pets below,..

Method to make the select field required:


but it will not work for you, because the theme is using ajax and ignores this required attribute.

If you want to make it required you need to write your own JS code.

Thanks

Hello, I’m testing to add a select box to the form tag, but how do I add it?
I code the custom liquid in the “Customize” section, not in “Edit Code”
There are two liquid code

Design Type *

Placement *

Thanks

Find the form tag in theme code.

I tried, but it still doesn’t work

You are not following the instructions.

It will not work until you will not place it in the right place.

You can find simple instructions here https://ui-elements-generator.myshopify.com/pages/line-item-property

Sorry, but I don’t understand what you mean.
I have placed the above code inside

code here

Or can I send the main-product.liquid file so you can add it for me?

Thank you!