Skip to content
Snippets Groups Projects
Commit 880967ea authored by Lucas García's avatar Lucas García
Browse files

fix: wpcft form fields filter and admin ui bugs

parent 13378460
No related branches found
No related tags found
No related merge requests found
...@@ -142,9 +142,17 @@ class Integration extends BaseIntegration ...@@ -142,9 +142,17 @@ class Integration extends BaseIntegration
null, null,
$form_id $form_id
), ),
'fields' => array_map(function ($field) { 'fields' => array_map(
return $this->serialize_field($field); function ($field) {
}, $form->scan_form_tags()), return $this->serialize_field($field);
},
array_values(
array_filter($form->scan_form_tags(), function ($tag) {
return $tag->basetype !== 'response' &&
$tag->basetype !== 'submit';
})
)
),
]; ];
} }
......
...@@ -27,7 +27,7 @@ function NewBackend({ add }) { ...@@ -27,7 +27,7 @@ function NewBackend({ add }) {
const onClick = () => add({ name, base_url: baseUrl, headers: [] }); const onClick = () => add({ name, base_url: baseUrl, headers: [] });
const disabled = !(name && baseUrl && !disabled); const disabled = !(name && baseUrl && !nameConflict);
return ( return (
<div <div
...@@ -51,7 +51,7 @@ function NewBackend({ add }) { ...@@ -51,7 +51,7 @@ function NewBackend({ add }) {
: "" : ""
} }
value={name} value={name}
onChange={setName} onChange={handleSetName}
__nextHasNoMarginBottom __nextHasNoMarginBottom
/> />
<TextControl <TextControl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment