diff --git a/includes/integrations/wpcf7/class-integration.php b/includes/integrations/wpcf7/class-integration.php index d479d24415f3f8ad05dbed958a3d839687ac41a9..bda4d9e2764c0953e565ef9ad04bcb69ce361a29 100644 --- a/includes/integrations/wpcf7/class-integration.php +++ b/includes/integrations/wpcf7/class-integration.php @@ -142,9 +142,17 @@ class Integration extends BaseIntegration null, $form_id ), - 'fields' => array_map(function ($field) { - return $this->serialize_field($field); - }, $form->scan_form_tags()), + 'fields' => array_map( + function ($field) { + return $this->serialize_field($field); + }, + array_values( + array_filter($form->scan_form_tags(), function ($tag) { + return $tag->basetype !== 'response' && + $tag->basetype !== 'submit'; + }) + ) + ), ]; } diff --git a/src/GeneralSettings/Backends/Backend.jsx b/src/GeneralSettings/Backends/Backend.jsx index eadb30ddbcf8d1ce58f41c0ac5059bd5c895d9fb..4ef913c2762e3d8001c2cdd72b8b0d4740cf1ff7 100644 --- a/src/GeneralSettings/Backends/Backend.jsx +++ b/src/GeneralSettings/Backends/Backend.jsx @@ -27,7 +27,7 @@ function NewBackend({ add }) { const onClick = () => add({ name, base_url: baseUrl, headers: [] }); - const disabled = !(name && baseUrl && !disabled); + const disabled = !(name && baseUrl && !nameConflict); return ( <div @@ -51,7 +51,7 @@ function NewBackend({ add }) { : "" } value={name} - onChange={setName} + onChange={handleSetName} __nextHasNoMarginBottom /> <TextControl