Skip Navigation

[Résolu] I want to export XML but Checkbox value is in some code format.

This support ticket is created Il y a 6 années et 1 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par NattapatP8602 Il y a 6 années et 1 mois.

Assisté par: Christian Cox.

Auteur
Publications
#1131925

I am trying to:
I'm trying to make XML export for the marketing site. But the value in the checkbox field is not in plain text format but some code. in this case <wpcf-features>

<data>
<post>
<id>9</id>
<Title>Testing</Title>
<Content/>
<PropertyTypes>Condominium</PropertyTypes>
<wpcf-features>
a:3:{s:64:"wpcf-fields-checkboxes-option-849c59c64c788e9e29cd2ff948966e47-1";a:1:{i:0;s:7:"jacuzzi";}s:64:"wpcf-fields-checkboxes-option-2f7fcc6f100dc286a96ab313d22de388-1";a:1:{i:0;s:7:"laundry";}s:64:"wpcf-fields-checkboxes-option-caab77bf6de45bddffb0d5a78a3abd18-1";a:1:{i:0;s:6:"garden";}}
</wpcf-features>
</post>
</data>

I expected to see:

<wpcf-features>jacuzzi|laundry|garden</wpcf-features>

Instead, I got:

<wpcf-features>
a:3:{s:64:"wpcf-fields-checkboxes-option-849c59c64c788e9e29cd2ff948966e47-1";a:1:{i:0;s:7:"jacuzzi";}s:64:"wpcf-fields-checkboxes-option-2f7fcc6f100dc286a96ab313d22de388-1";a:1:{i:0;s:7:"laundry";}s:64:"wpcf-fields-checkboxes-option-caab77bf6de45bddffb0d5a78a3abd18-1";a:1:{i:0;s:6:"garden";}}
</wpcf-features>

I use wp all export pro.

#1132143

Hi, Types checkboxes fields are stored in the database as serialized data structures instead of plain text. The code you're seeing here is a representation of a serialized data structure, and it appears to be working as designed. If you'd like to produce a different output format for checkboxes, it may require custom code or a custom integration with the export plugin.

#1132920

My issue is resolved now. Thank you!