add_action('elementor_pro/forms/new_record', 'custom_elementor_form_action', 10, 2); function custom_elementor_form_action($record, $handler){ $form_data = $record->get_formatted_data(); // Customize this array based on your form fields $post_data = array( 'post_title' => $form_data['field_name'], 'post_content' => $form_data['message'], 'post_type' => 'post', // Adjust post type as needed 'post_status' => 'draft' // Set the post status to 'draft' ); $post_id = wp_insert_post($post_data); // You can add more customization or error handling here }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter