Contact Form 7
-
Hi,
I had the same issue as this guy had in the following link:
The difference being i have about 80 checkboxes on my page and each page has a different amount of checkboxes. I have added the code and all of the checkboxes to the function but when i tick a checkbox it still displays “off” in the email, so what can i do to fix that? If i remove the ‘off’ then my email is blank, is there a way to remove the whitespacing. Thirdly, this causes my contact form to just display the hour glass and it never says that the message has been sent.
My function currently looks like this (i have removed the rest of the checkboxes to make it simpler but i do have 84 checkboxes on this particular page)
add_filter( 'wpcf7_posted_data', 'your_custom_wpcf7_posted_data' ); function your_custom_wpcf7_posted_data( $posted_data ) { if ( ! isset( $posted_data['checkbox-1'], $posted_data['checkbox-2'], $posted_data['checkbox-3']) ) $posted_data['checkbox-1'] = 'off'; $posted_data['checkbox-2'] = 'off'; $posted_data['checkbox-3'] = 'off'; return $posted_data; }
- The topic ‘Contact Form 7’ is closed to new replies.