Quantcast
Channel: WordPress.org Forums
Viewing all articles
Browse latest Browse all 46187

HitchB on "[Plugin: WP-Table Reloaded] Adding values from external plugin"

$
0
0

This is the code used to post the values and it works. However I need to present them in a clean table.

add_action('iphorm_post_process_2', 'mytheme_create_wp_post', 10, 1);

function mytheme_create_wp_post($form)

{

    $title = $form->getValue('iphorm_2_1'); // Unique ID field referring to the form.

$content .= '<br>Country:<br />' . $form->getValue('iphorm_2_11'); // iphorm_x_x is the ID of the field.

$content .= '<br>Location:<br />' . $form->getValue('iphorm_2_12');

$content .= '<br>Company:<br />' . $form->getValue('iphorm_2_2');

$content .= '<br>Website:<br />' . $form->getValue('iphorm_2_4');

$content .= '<br>Category:<br />' . $form->getValue('iphorm_2_7');

$content .= '<br>Description:<br />' . $form->getValue('iphorm_2_8');

$content .= '<br>Expiry Date:<br />' . $form->getValue('iphorm_2_10');

    $post = array(

        'post_title' => $title,

        'post_content' => $content

    );

    wp_insert_post($post);

}

Viewing all articles
Browse latest Browse all 46187

Trending Articles