sending form to external URL don’t work

Home Forums Quform WordPress sending form to external URL don’t work

This topic is: not resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33752
    triptan
    Participant

    I followed instruction found at this URL:

    Sending form data to another script

    At first it was working, but then it stopped.
    With a normal HTML form it still works., seem like the code I’ve used in a plugin is not called.
    The code used is the following:

    <?php

    /*
    * Plugin Name: VTNext Qform integration
    * Description: by Alberto Speggiorin: maps Qform form fields to VTEForm fields and set a custom form actions. To be used with form ID 1 (IT), ID 5 (FR) AND ID 6 (EN)
    * Version: 2.6 – 29 11 21 – SOLO ITALIANO – no error debug
    */

    /* ITALIANO*/
    add_action(‘quform_post_process_1’, function (array $result, Quform_Form $form){
    $data = array(
    ‘firstname’ => $form->getValue(‘quform_1_3’),
    ‘lastname’ => $form->getValue(‘quform_1_4’),
    ‘publicid’ => $form->getValue(‘quform_1_5’),
    ‘name’ => $form->getValue(‘quform_1_6′),
    ’email’ => $form->getValue(‘quform_1_7’),
    ‘company’ => $form->getValue(‘quform_1_8’),
    ‘website’ => $form->getValue(‘quform_1_9’),
    ‘designation’ => $form->getValue(‘quform_1_10’),
    ‘phone’ => $form->getValue(‘quform_1_11’),
    ‘label_Industria’ => $form->getValue(‘quform_1_12’),
    ‘label_Dimensione_azienda’ => $form->getValue(‘quform_1_13’),
    ‘label_Messaggio’ => $form->getValue(‘quform_1_14’),
    ‘leadsource’ => $form->getValue(‘quform_1_15’),
    ‘label_Form_url’ => $form->getValue(‘quform_1_16’),
    ‘label_Referring_url’ => $form->getValue(‘quform_1_17’),
    ‘label_User_agent’ => $form->getValue(‘quform_1_18’),
    ‘label_Privacy’ => $form->getValue(‘quform_1_19’),
    ‘country’ => $form->getValue(‘quform_1_21’)
    );

    $response = wp_remote_post(‘https://xxx.xxx.it/modules/Webforms/capture.php&#8217;, array(
    ‘body’ => $data
    ));

    return $result;
    }, 10, 2);

    #33757
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    • This reply was modified 2 years, 4 months ago by Ally.
    #33964
    triptan
    Participant

    HI,
    sorry for the late reply.
    I’ve installed the plugin you suggested and you can see the result in the screenshot below

    Attachments:
    You must be logged in to view attached files.
    #33967
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy