Storage of multi-value fields
-
I really like this plugin, but what I really don’t understand, why are the values that someone selects in a checkbox or multiselect, stored in the database separated with a pipeline character (“|”) and not as a serialized array?
So if someone for example picks 3 values: Fries, Pasta and Pizza, then in the database I see that they are stored like:
Fries | Pasta | Pizza
While it would make much more sense to store them like:
a:3:{i:0;s:5:”Fries”;i:1;s:5:”Pasta”;i:2;s:5:”Pizza”;}
They way values are stored now, makes it pretty much impossible to use filters on my website. I used several filtering plugins, but instead of getting each “food type” as separate choices to filter on, I get 1 filter choice of “Fries | Pasta | Pizza” if user A picked that, another option of “Sushi | Fries | Pancakes” if user B picked that, etc.
Even if I match the WPUF fields with ACF fields, the values are still stored using the pipeline character, instead of a serialized array (which ACF would normally do).
Is there a way I can make filtering work, when using fields that can store multiple values?
The topic ‘Storage of multi-value fields’ is closed to new replies.