Skip to content

Commit

Permalink
[5.x] Introduce additional form tag hooks (#11010)
Browse files Browse the repository at this point in the history
  • Loading branch information
leewillis77 authored Oct 25, 2024
1 parent 816bc96 commit 88ec65b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Forms/Tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function create()
if ($jsDriver) {
$attrs = array_merge($attrs, $jsDriver->addToFormAttributes($form));
}
$attrs = $this->runHooks('attrs', ['attrs' => $attrs, 'data' => $data])['attrs'];

$params = [];

Expand All @@ -121,11 +122,13 @@ public function create()
}

$html = $this->formOpen($action, $method, $knownParams, $attrs);
$html = $this->runHooks('after-open', ['html' => $html, 'data' => $data])['html'];

$html .= $this->formMetaFields($params);

$html .= $this->parse($data);

$html = $this->runHooks('before-close', ['html' => $html, 'data' => $data])['html'];
$html .= $this->formClose();

if ($jsDriver) {
Expand Down

0 comments on commit 88ec65b

Please sign in to comment.