Home › Forums › General Issues › How to populate a post object (multiple, with Gravity forms) › Reply To: How to populate a post object (multiple, with Gravity forms)
Fixed my single data issue also. The data I got back from my previous function looked like
a:6:{i:0;s:3:"112";i:1;s:4:" 113";i:2;s:4:" 114";i:3;s:4:" 115";i:4;s:4:" 111";i:5;s:4:" 116";}
Take a note to the spaces, the spaces resulted in incompatible data. To fixed this I changed the line in the function $values = explode(",", $checked);
to $values = explode(", ", $checked);
and now the data looked like:
a:6:{i:0;s:3:"114";i:1;s:3:"113";i:2;s:3:"116";i:3;s:3:"115";i:4;s:3:"111";i:5;s:3:"112";}
No spaces!
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.