Skip to content

Commit

Permalink
add support for conditional forms - #
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem-blok committed Sep 25, 2024
1 parent 4568693 commit 457c28a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class FormBuilder
/**
* Add a new step.
*/
public function add(Closure $step, ?string $name = null, bool $ignoreWhenReverting = false): self
public function add(Closure $step, ?string $name = null, bool $ignoreWhenReverting = false, bool|Closure $condition = true): self
{
$this->steps[] = new FormStep($step, true, $name, $ignoreWhenReverting);
$this->steps[] = new FormStep($step, $condition, $name, $ignoreWhenReverting);

return $this;
}
Expand Down

0 comments on commit 457c28a

Please sign in to comment.