How to add custom field in Checkout / Cart

Hi, I need to. be able to add a form on checkout or cart for specific products, as to complete the order I need specific information from the customer. How would I go about this for Dawn theme? Thanks in advanced.

Hi @StealthStores , great question.

You can add a custom field to your checkout by using one of the apps from the Shopify app store. I found this great article on the top custom field apps in 2022.

You can also hire someone to make the changes to your checkout with coding. This option most likely will cost more upfront, but you can make other customization changes to your checkout also. You can find freelancers that can do this for you on websites like Fiverr.

Please let me know if you have more questions about any information shared.

Hi [email removed]StealthStores,

This is Victor from PageFly - Landing Page Builder App

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file main-product.js

Step 3: search key work “form ‘product’, product, id: product_form_id” Paste the below code as my screenshost → Save


                  
                   
                   
                  

you can add the same for email , address ,.. if the fields are not added the add to cart will not be clickable because the code check value added

Hope my solution works perfectly for you!

Best regards,

Victor | PageFly

Thank you for that code. It worked perfectly and the instructions were straight forward. Is there a way to have it show for specific products? I don’t need it for all products, just two of them. Just curious.

Hi Victor,
This is exactly the solution that I need, but it seems that since you made this walkthrough and these screenshots a lot has changed.

I was able to find “main-product.liquid”, but there is no text that matches your recommended search; specifically "form ‘product’, product, id: product_form_id”.

Because I can’t find this text I don’t know where to paste your code, and I wonder whether perhaps your code is outdated.

I have added a screenshot of a location that I think might match what you were referring to.

Are you perhaps willing to make an update?

I am looking for a way to force the customer to fill in an additional field for ALL products; specifically - I require them to add a second address. This is essential for the service that I am providing.

Thank you!!