rendered paste body<?php
/*
* Process multiple sets of fields.
*/
function xarpages_funcapi_multiples($args)
{
$xforms = $_POST;
if (!empty($xforms)) {
$count = count($xforms['title']);
foreach ($xforms as $key => $values) {
for ($i=0; $i<$count; $i++) {
$xarray[$i][$key] = $values[$i];
}
}
if (!empty($xarray)) {
foreach ($xarray as $items) {
$newitem = xarModAPIFunc('articles','admin','create',array(
'title' => $items['title'],
'summary' => $items['summary'],
'attach_upload' => $items['attach_upload'],
'body' => $items['body'],
'body_attach_upload' => $items['body_attach_upload'],
'ptid' => 13,
'caid' => $items['caid'],
'notes' => $items['notes']));
$args['custom']['newaids'][] = $newitem;
}
}
} // end first if
return $args;
}
?>