+
+
+ option.label)]}
+ defaultValue="None"
+ value={
+ field.options?.find((option) => option.key === selectedGroup)?.label
+ }
+ onChange={(v) => {
+ // reset all other fields that are not selected
+ field.options?.forEach((option) => {
+ if (option.key === v) {
+ return;
+ }
+ setFieldValue(option.key, undefined);
+ });
+ setSelectedGroup(
+ field.options?.find((option) => option.label === v)?.key
+ );
+ }}
+ />
+
+
+ {selectedField?.fields?.map((field) => (
+
+ ))}
+
+
+ );
+}
diff --git a/src/components/Connections/RenderConnectionFormFields.tsx b/src/components/Connections/RenderConnectionFormFields.tsx
new file mode 100644
index 0000000000..f3d9b3d628
--- /dev/null
+++ b/src/components/Connections/RenderConnectionFormFields.tsx
@@ -0,0 +1,60 @@
+import FormikConnectionOptionsSwitchField from "./FormikConnectionOptionsSwitchField";
+import FormikCheckbox from "../Forms/Formik/FormikCheckbox";
+import { FormikEnvVarSource } from "../Forms/Formik/FormikEnvVarSource";
+import FormikTextInput from "../Forms/Formik/FormikTextInput";
+import { ConnectionFormFields } from "./connectionTypes";
+
+interface FieldViewProps {
+ field: ConnectionFormFields;
+}
+
+export default function RenderConnectionFormFields({ field }: FieldViewProps) {
+ const type = field.type ?? "input";
+ switch (type) {
+ case "input":
+ return (
+