Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1070392

    Hello, I use this code to work with variables before the form is sent with wp_mail. I would like to know how to check a variable of the form if it is checked TRUE? The field name I want to check is: avia_7_1

    
    add_filter('avf_form_send', 'avia_process_form_data', 10, 3);
    	function avia_process_form_data($send, $new_post, $form_params)
    	{
    		
    		foreach ($new_post as $current_key => $current_post)
    				{
    					//loop through all contact form fields.
                                            //check if field avia_7_1 is checked (checkbox = true)
                                            // do something
    				}
    		
    		
    		return true;  // enfold sending mail
    	}

    Thank you for Enfold!

    • This topic was modified 5 years, 10 months ago by royaltask.
    #1070400

    is this the right way?
    $mysubject = urldecode($new_post['7_1']);

    #1070747

    Hi royaltask,

    Yes, this should work. Have you tried it yet?

    Best regards,
    Victoria

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.