Skip to content

Commit 1a039a4

Browse files
Merge pull request #465 from Codeinwp/bugfix/pro/549
Fixed broken product page layout
2 parents 28dab66 + 0d0793f commit 1a039a4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

classes/form.class.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ function( $collapse_field ) {
182182

183183
$section_started = true;
184184
$ppom_collapse_counter ++;
185+
186+
if ( count( $fields ) === $ppom_field_counter ) {
187+
echo '</div>';
188+
}
185189
}
186190

187191
// skip collapse div
@@ -218,14 +222,14 @@ function( $collapse_field ) {
218222

219223
$field_html .= '</div>';
220224

221-
if ( count( $collapse_fields ) === $ppom_collapse_counter && $section_started ) {
222-
$section_started = false;
223-
}
224-
225225
// Filter: nmforms_input_htmls
226226
// @TODO need to change with relevant name
227227
echo apply_filters( 'nmforms_input_html', $field_html, $meta, $default_value );
228228

229+
if ( count( $fields ) === $ppom_field_counter && $section_started ) {
230+
echo '</div>';
231+
$section_started = false;
232+
}
229233
}
230234
}
231235

0 commit comments

Comments
 (0)