Thanks for the comment! To adjust the width of the textbox you would just add the width to the styles. For example: #cart_attribute input { ... width: 150px; }
Thanks for the comment. There's a few ways I can think about achieving this. 1. Hijack the 'add to cart' via JavaScript, and reject the request if it does not contain the text field value. (Probably the one I would choose). 2. Listen for changes to cart and write a script to check if the required field is there, if not remove it and provide a notification why 3. Listen for changes to cart and write a script to check if the required field is there and if it is not, force a modal that the user must fill out. 4. If you are on Shopify Plus, write a Shopify Function that required that field before checkout.
Nice and interesting video, you clearly know a lot about shopify development, good job! You gave me new insights on how to fix a problem :)
@@DesignerMichaelMoyson thank you so much 🙏
Thank you! How do you adjust the length of the textbox?
Thanks for the comment! To adjust the width of the textbox you would just add the width to the styles. For example:
#cart_attribute input {
...
width: 150px;
}
amazing
@@michaelhirt3915 thank you 🙏
how can we make this field required
Thanks for the comment. There's a few ways I can think about achieving this.
1. Hijack the 'add to cart' via JavaScript, and reject the request if it does not contain the text field value. (Probably the one I would choose).
2. Listen for changes to cart and write a script to check if the required field is there, if not remove it and provide a notification why
3. Listen for changes to cart and write a script to check if the required field is there and if it is not, force a modal that the user must fill out.
4. If you are on Shopify Plus, write a Shopify Function that required that field before checkout.