Skip to content

Commit

Permalink
Pass form handle to subscribe function (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Sep 4, 2024
1 parent ad2f8bb commit 7f3dcc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public static function fromSubmission(Submission $submission): ?self
return null;
}

$config['form'] = $form->handle();

return new self($submission->data(), $config);
}

Expand Down
1 change: 1 addition & 0 deletions tests/Unit/SubscriberFromSubmissionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ public function it_gets_config_from_form()
],
],
'primary_email_field' => 'email',
'form' => 'contact_us',
];

$this->form->merge([
Expand Down

0 comments on commit 7f3dcc4

Please sign in to comment.