You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically, here add a case for [%] that will use the following function to prepare the destination field (key) for indexed nesting by the XPost plugin.
function placeholder_separator($post) {
$new = array(); // add results to new so we don't pollute the enumerator
// find the arrays and reformat keys with index
foreach($post as $f => $v) {
if(is_array($v)) {
// for each item in the submission array,
// get its numerical index and replace the
// placeholder in the destination field
foreach($v as $i => $p) {
$k = str_replace('%i', $i, $f);
$new[$k] = $p;
}
unset($post[$f]); // now remove original, since we need to reattach under a different key
}
}
return array_merge($post, $new);
}
The text was updated successfully, but these errors were encountered:
See zaus/forms-3rdparty-xpost#11
Specifically, here add a case for
[%]
that will use the following function to prepare the destination field (key) for indexed nesting by the XPost plugin.The text was updated successfully, but these errors were encountered: