diff --git a/src/lib/forms/widgets/custom_fields/CustomFields.js b/src/lib/forms/widgets/custom_fields/CustomFields.js
index afa607d6..7b6d34dc 100644
--- a/src/lib/forms/widgets/custom_fields/CustomFields.js
+++ b/src/lib/forms/widgets/custom_fields/CustomFields.js
@@ -10,6 +10,7 @@ import PropTypes from "prop-types";
import { DiscoverFieldsSection } from "./DiscoverFieldsSection";
import { AccordionField } from "../../AccordionField";
import { loadWidgetsFromConfig } from "../loader";
+import { Container } from "semantic-ui-react";
export class CustomFields extends Component {
constructor(props) {
@@ -77,16 +78,26 @@ export class CustomFields extends Component {
return (
<>
{sections &&
- sections.map(({ fields, paths, ...sectionConfig }) => (
-
- {fields}
-
- ))}
+ sections.map((section) => {
+ const {
+ fields,
+ paths,
+ displaySection,
+ section: sectionName = "",
+ } = section;
+ return displaySection ? (
+
+ {fields}
+
+ ) : (
+ {fields}
+ );
+ })}
{discoverFieldsSections && discoverFieldsSections.length > 0 && (