diff --git a/Layout/default/ConstructionConsent/Form.php b/Layout/default/ConstructionConsent/Form.php
index a679d7eb0..7b8f6b352 100644
--- a/Layout/default/ConstructionConsent/Form.php
+++ b/Layout/default/ConstructionConsent/Form.php
@@ -78,6 +78,16 @@
+
">
@@ -303,6 +313,46 @@
allowClear: true
});
+ const netzgebietId = =isset($item) && $item->data->netzgebiet_id ? $item->data->netzgebiet_id : "null"?>;
+ console.log("netzgebietId", netzgebietId);
+ const netzgebietSelect = $('#netzgebiet_id');
+ const apiUrl = '=self::getUrl("ConstructionConsent", "api")?>';
+
+ function fetchNetzgebiete(projectId, searchTerm = '') {
+ $.ajax({
+ url: apiUrl,
+ data: { q: searchTerm, do: "getNetzgebieteApi", project_id: projectId },
+ dataType: 'json',
+ success: (data) => {
+ netzgebietSelect.empty();
+ netzgebietSelect.append($('