• Resolved walacky

    (@walacky)


    I have an user update registration form. In this form, the user can edit the meta data (which are stored in ACF fields), and these values will automatically displaying in the form as default values with {user.meta.META_KEY}.

    This works fine so far, but if the user does not change the value of the ‘Multiple choice’ fields, the data is lost after saving. (If they change it (add or delete values), everything still works super well. )

    So why does it happen that the default values (if not changed) are clears the fields values and the field becomes empty (or corrupted) after submission?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter walacky

    (@walacky)

    According to chatGPT, this could be the source of the problem:

    The format you’re seeing, a:2:{i:0;s:17:"Option 1";i:1;s:13:"Option 2";}, suggests that the data is being serialized in PHP’s serialization format. This indicates a discrepancy between how JavaScript (via Choices.js) and your server-side PHP code are handling the data. When PHP serializes an array, it encodes the array structure, including the length of each string within the array, which is not directly compatible with JavaScript or JSON formats.

    To resolve this issue, you need a consistent format for transmitting data between your frontend (JavaScript) and backend (PHP). JSON is a widely supported format for this purpose, offering compatibility with JavaScript and easy handling in PHP.

    Plugin Support Abul Khoyer

    (@hellokhoyer)

    Hello @walacky,

    Thanks for bringing this to our attention. It seems to be a bug. I have notified the developer. Hopefully, it will be fixed in the next update.

    Thank you.

    Thread Starter walacky

    (@walacky)

    @hellokhoyer

    When is this fix expected? It would be great if I could use this plugin…

    Thread Starter walacky

    (@walacky)

    @hellokhoyer

    Is there any chance that this bug will be fixed in the relatively near future?

    Plugin Support Amimul Ihsan Mahdi

    (@amimulihsanmahdi)

    Hello @walacky,

    Apologies for the inconvenience. Our recent update includes the fix of this bug. Feel free to test it out and let us know if you have any issues.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multiple choice fields bug if displays default values’ is closed to new replies.