Support

Account

Home Forums General Issues How to load the exact data from the database and does not strip any spaces?

Helping

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

  • 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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.