Quantcast
Viewing all articles
Browse latest Browse all 20145

Reply To: [Waiting for user feedback] Multiple Field inputs

Please try this:
Add following codes in your theme/functions.php:

/*
* Multiple Field inputs
*/
add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==2271)
{
if (isset($_POST['wpcf-owners-name']) && isset($_POST['wpcf-petname']))
{
$my_post = array();
$my_post['ID'] = $post_id;
$my_post['post_title'] = $_POST['wpcf-owners-name'] . ' – ' . $_POST['wpcf-petname'];
wp_update_post( $my_post );
}
}
}

More help: http://codex.wordpress.org/Function_Reference/wp_update_post
Please let me know if you need assistance to do it


Viewing all articles
Browse latest Browse all 20145