Add the following code to the WordPress theme functions.php file (or create a plugin for it).

123
4
5678
9
10
11
12
13
14
15
16
17
add_action('quform_post_process_1', function (array $result, Quform_Form $form) {    $url = 'https://www.webmerge.me/merge/000000/abcdef'; 
    $data = array(
        'Name' => $form->getValueText('quform_1_3'),        'Email' => $form->getValueText('quform_1_4'),        'Phone_number' => $form->getValueText('quform_1_5'),    );
 
    $args = array(
        'body' => $data
    );
 
    wp_remote_post($url, $args);
 
    return $result;
}, 10, 2);
add_action('quform_post_process_1', function (array $result, Quform_Form $form) {
    $url = 'https://www.webmerge.me/merge/000000/abcdef';

    $data = array(
        'Name' => $form->getValueText('quform_1_3'),
        'Email' => $form->getValueText('quform_1_4'),
        'Phone_number' => $form->getValueText('quform_1_5'),
    );

    $args = array(
        'body' => $data
    );

    wp_remote_post($url, $args);

    return $result;
}, 10, 2);
  • On line 1, replace the number 1 with the form ID
  • On line 2, replace the URL with the WebMerge document Merge URL which you can find on the Merge tab of the Document settings within WebMerge (a Test URL will also work)
  • On line 5, replace Name with the name of the first merge field, and replace 1_3 with the form element unique ID to merge into this field
  • Repeat the above step for lines 6 and 7, add more lines to add more merge fields
Be inspired. © 2018 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy