Skip to content

Commit 1cb3e57

Browse files
committed
Fix Payment fields displaying in Summary field content by default
1 parent 3b555d8 commit 1cb3e57

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/elements/Submission.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,11 @@ public function getValuesForSummary(): array
863863
$value = $this->getFieldValue($field->handle);
864864
$html = $field->getValueForSummary($value, $this);
865865

866+
// Just in case some fields want to opt-out
867+
if ($html === false || $html === null) {
868+
continue;
869+
}
870+
866871
$items[] = [
867872
'field' => $field,
868873
'value' => $value,

src/fields/formfields/Payment.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ protected function defineValueAsString($value, ElementInterface $element = null)
259259
return (string)$value;
260260
}
261261

262+
public function getValueForSummary(mixed $value, ?ElementInterface $element = null): mixed
263+
{
264+
return false;
265+
}
266+
262267

263268
// Private Methods
264269
// =========================================================================

0 commit comments

Comments
 (0)