[Contact Form 7] dynamically added checkboxes return only one value in email
-
I created dynamic checkboxes from my custom taxonomy terms to the contact form by adding this snippet to my functions.php:
wpcf7_add_shortcode('choosecat', 'createbox', true); function createbox(){ global $post; $args = array('hide_empty' => false, 'orderby' => 'name'); $terms = get_terms( 'branchen', $args ); $output .= '<ul class="checkboxes">'; foreach ( $terms as $term ) : setup_postdata($cat); $title = $term->name; $output .= "<li><input name='branches' type='checkbox' value='$title'> $title</input></li>"; endforeach; $output .= '</ul>'; return $output; }
So far so good, the terms are being displayed.
But after selecting multiple chechboxes, still only one value is being output in the email – why is that?
Please advise, much appreciated!
- The topic ‘[Contact Form 7] dynamically added checkboxes return only one value in email’ is closed to new replies.