Hi
I have created custom order field and I want to prefill them with text value. How should I approach this?
I checked the document but could not find a section for this.
Any help is appreciated
Hi
I have created custom order field and I want to prefill them with text value. How should I approach this?
I checked the document but could not find a section for this.
Any help is appreciated
Hey @MorningTide,
Unfortunately, it’s not possible to prefill the custom field with a value at the moment. This is something we do have in our backlog, but no ETA at this point.
Hi
Thank you for your reply. That’s a bit unfortunate.
I was hoping to create a system where I have the user selects wards and districts then fill the zip code field accordingly. There’s must be someway to achieve this. I will try to look into it more.
Hi @charles
I am wondering about this method, can you help me by confirming if this would work or not.
Looking forward to hearing from you soon
Hi, I would love to follow up on this topic. It’s ok if it is not possible
Hi @lea
Thank you for the reply but I read the documentation, it says that all field must be filled and I am only need to fill the zip code field for the customer.
Customers checkout → Input their address → the zip code is already filled → Customer doesn’t have to fill them anymore
I hope that makes sense
Hi there,
At the moment, addresses are validated as a whole upon patching the cart. It is currently not possible to patch only a subset of the required fields.
Hi @francis
I just tried self-hosting snipcart.js and changed that specific field I mentioned above. It worked!
Thanks for the update. Well that’s good if you managed to modify our scripts to make it work! Definitely not the typical integration path though
For the record, this is an extreme situation that I had to do this. I would not recommend anyone to do this since:
I only change the postal code field so that it has a default value of something else instead of being blank.
With that being said, it shows that there is potential for expandability i.e set default value for a certain field.