Skip to content

Commit

Permalink
improve cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed May 22, 2023
1 parent 3ab4f9c commit 84def7b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,17 @@ public function setFormConfig($config)

public function setupAjaxSubmit(): void
{
$this->js(true)->form(array_merge(['inline' => true, 'on' => 'blur'], $this->formConfig));

$this->js(true, null, $this->formElement)
->api(array_merge(['on' => 'submit', 'url' => $this->cb->getJsUrl(), 'method' => 'POST', 'serializeForm' => true], $this->apiConfig));
$this->js(true)->form(array_merge([
'on' => 'blur',
'inline' => true,
], $this->formConfig));

$this->formElement(true)->api(array_merge([
'on' => 'submit',
'url' => $this->cb->getJsUrl(),
'method' => 'POST',
'serializeForm' => true,
], $this->apiConfig));

// [name] in selector is to suppress https://github.com/fomantic/Fomantic-UI/commit/facbca003cf0da465af7d44af41462e736d3eb8b
// console errors from Multiline/vue fields
Expand Down

0 comments on commit 84def7b

Please sign in to comment.