function cfdef_input_checkbox($p_field_def, $t_custom_field_value) { $t_values = explode( '|', custom_field_prepare_possible_values( $p_field_def['possible_values'] ) ); $t_checked_values = explode( '|', $t_custom_field_value ); /* original function body foreach( $t_values as $t_option ) { echo ' ' . string_display_line( $t_option ) . '  '; } else { echo ' value="' . string_attribute( $t_option ) . '"> ' . string_display_line( $t_option ) . '  '; } } */ $t_column_number = 0; $i=0; $t_total_values = count($t_values); echo ''; while ( $i < count( $t_values ) ){ if ( ( $t_column_number % 4 ) == 0 ){ echo ''; for( $i=0; $i < count( $t_values ); $i++ ) { echo ''; $t_column_number = $t_column_number + 1; if ( ( $t_column_number % 4 ) == 0 ) { echo ''; } if ( ( $t_column_number % 4 ) == 0 ) { echo ''; } } echo ''; } } echo '
'; echo ' ' . string_display_line( $t_values[$i] ) . '  '; } else { echo ' value="' . string_attribute( $t_values[$i] ) . '"> ' . string_display_line( $t_values[$i] ) . '  '; } echo '
'; }