Submit events & Form Data

Home Forums Quform WordPress Submit events & Form Data

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Ally 1 week, 2 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29841

    welightspeed_web
    Participant

    Hi,
    I’m trying to add all form data to a CRM via API when someone submits.
    How can I trigger my own code to run when a form is submitted and how do I access the submitted form data?
    Thanks

    #29856

    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.

    #29910

    welightspeed_web
    Participant

    Thanks for your response.
    I’ve had some further trouble with the action not having the correct number of arguments:
    I’m using PHP 7.2.

    
    add_action('quform_post_process_4', function (array $result, Quform_Form $form) {
        $data = array(
            'name' => $form->getValue('quform_4_5'),        
            'email' => $form->getValue('quform_4_7'),        
            'notes' => $form->getValue('quform_4_9'),        
        );
    
    
    <br />
    <b>Fatal error</b>:  Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /home/tradeoak/staging/5/wp-includes/class-wp-hook.php on line 288 and exactly 2 expected in /home/tradeoak/staging/5/wp-content/themes/tradeoak/functions.php:270
    Stack trace:
    #0 /home/tradeoak/staging/5/wp-includes/class-wp-hook.php(288): {closure}(Array)
    #1 /home/tradeoak/staging/5/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array)
    #2 /home/tradeoak/staging/5/wp-content/plugins/quform/library/Quform/Form/Processor.php(172): apply_filters('quform_post_pro...', Array, Object(Quform_Form))
    #3 /home/tradeoak/staging/5/wp-content/plugins/quform/library/Quform/Form/Controller.php(245): Quform_Form_Processor->process(Object(Quform_Form))
    #4 /home/tradeoak/staging/5/wp-content/plugins/quform/library/Quform/Form/Controller.php(178): Quform_Form_Controller->handleProcessRequest()
    #5 /home/tradeoak/staging/5/wp-includes/class-wp-hook.php(286): Quform_Form_Controller->process('')
    #6 /home/tradeoak/staging/5/wp-includes/cl in <b>/home/tradeoak/staging/5/wp-content/themes/tradeoak/functions.php</b> on line <b>270</b><br />
    
    #29931

    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. © 2019 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy