Hi Support,
As per documentation rwmb_frontend_after_process
on https://docs.metabox.io/extensions/mb-frontend-submission/ it is stated that $config['post_id'] has the submitted post ID
but I am not getting it.
My task is to update title with meta field called emnsh-name
value so that I have tried the above stated hook and I get 0 value of config['post_id'] can you please guide me how do solve this problem
below is my code
for custom post type
add_action ('rwmb_frontend_after_process','emnsh_rwmb_frontend_after_process',10);
function emnsh_rwmb_frontend_after_process($config){
if (isset($config['post_id'])) {
$name = rwmb_meta('emnsh-name');
wp_update_post(array(
'ID' => $config['post_id'],
'post_title'=>$name
));
}
}
I can see the form values are saved
Expecting response ASAP
Thanks