Reply To: Submit events & Form Data

Home Forums Quform WordPress Submit events & Form Data Reply To: Submit events & Form Data

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