Home › Forums › Quform WordPress › Pods integration › Reply To: Pods integration
May 26, 2022 at 11:36 pm #34293
marianogi
Participant
Hi again, here I post what I needed to integrate with Pods plugin. Maybe I can help more people with the same need:
add_filter('quform_post_process_1', function (array $result, Quform_Form $form) {
$pod_field1 = $form->getValue('quform_1_2');
$pod_field2 = $form->getValue('quform_1_3');
$pod_field3 = $form->getValue('quform_1_4');
$fields = array(
'post_title' => 'item name:' . ' - ' . $pod_field1,
'pod_field1' => $pod_field1,
'pod_field2' => $pod_field2,
'pod_field3' => $pod_field3
);
$new_id = pods( 'pod_name_here' )->add( pods_sanitize ($fields) );
return $new_id;
}, 10, 2);
Very easy!