diff --git a/src/core_modules/capture-core/components/D2Form/D2Section.component.js b/src/core_modules/capture-core/components/D2Form/D2Section.component.js index e0cf89264c..d9a58c009d 100644 --- a/src/core_modules/capture-core/components/D2Form/D2Section.component.js +++ b/src/core_modules/capture-core/components/D2Form/D2Section.component.js @@ -74,6 +74,7 @@ class D2SectionPlain extends React.PureComponent { renderSection(sectionProps) { const { sectionMetaData, classes, sectionId, ...passOnProps } = sectionProps; + const { applyCustomFormClass } = this.props; if (!sectionMetaData.showContainer || this.props.formHorizontal) { return ( @@ -87,7 +88,10 @@ class D2SectionPlain extends React.PureComponent { ); } return ( -
+
{ } render() { - const { isHidden, applyCustomFormClass, ...passOnProps } = this.props; + const { isHidden, ...passOnProps } = this.props; if (isHidden) { return null; } - return (
- { - this.renderSection(passOnProps) - } -
); + return ( + + {this.renderSection(passOnProps)} + + ); } } diff --git a/src/core_modules/capture-core/components/D2Form/D2SectionFields.component.js b/src/core_modules/capture-core/components/D2Form/D2SectionFields.component.js index 218004f055..bf7e55746e 100644 --- a/src/core_modules/capture-core/components/D2Form/D2SectionFields.component.js +++ b/src/core_modules/capture-core/components/D2Form/D2SectionFields.component.js @@ -274,6 +274,7 @@ export class D2SectionFieldsComponent extends Component { { this.formBuilderInstance = instance; }} id={formId} + data-test="dhis2-capture-form" fields={this.getFieldConfigWithRulesEffects()} dataElements={this.formFields} values={values}