Permalink
Browse files

Line breaks between checkboxes

  • Loading branch information...
1 parent a225a33 commit 843fc86263f6caf991c29a5b98a4b302c3555c73 @alanhogan committed Aug 21, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 modules/checkbox.php
View
@@ -73,6 +73,9 @@ function wpcf7_checkbox_shortcode_handler( $tag ) {
$posted = is_a( $wpcf7_contact_form, 'WPCF7_ContactForm' ) && $wpcf7_contact_form->is_posted();
+ //Array to store HTML of items until it can be glued together with
+ //<BR>s between checkbox items
+ $items = array();
foreach ( $values as $key => $value ) {
$checked = false;
@@ -111,9 +114,10 @@ function wpcf7_checkbox_shortcode_handler( $tag ) {
// $item = '<label for="'.$this_id.'">' . $item . '</label>';
// $item = '<span class="wpcf7-list-item">' . $item . '</span>';
- $html .= $item;
+ $items[] = $item;
}
-
+ $html .= implode("\n ",$items);
+
$html = '<span' . $atts . '>' . $html . '</span>';
$validation_error = '';

0 comments on commit 843fc86

Please sign in to comment.