Home › Forums › General Issues › How to load the exact data from the database and does not strip any spaces? › Reply To: How to load the exact data from the database and does not strip any spaces?
I have a custom text field in which the data needs to have multiple spaces on the end. Its a special ID number for a 3rd party system we are integrating with WooCommerce products, and that systems IDs need to be packed up to 48 characters, if the actual ID characters do not add up to 48 then the rest is packed with spaces to fill it.
It saves into the database OK with 48 characters and the ending with spaces, but when we load it on the product edit screen, all the end spaces are removed. Any spaces within any characters are kept, but the end ones are truncated.
This means when saving the page, the spaces are removed in the database and then ID numbers wont match.
How can we ensure ACF loads the exact data from the database and does not strip anything out not even spaces?
Thanks
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.