Skip to content

Commit d4d2d40

Browse files
committed
refactor: mapMessage and using the actual message
1 parent 041b65e commit d4d2d40

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

source/php/Module/FormatSteps.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private function fieldMapper(array $field)
7070
case 'textarea':
7171
return $this->mapTextarea($field);
7272
case 'message':
73-
return $this->mapBasic($field, 'message');
73+
return $this->mapMessage($field);
7474
case 'radio':
7575
return $this->mapRadio($field);
7676
case 'number':
@@ -98,6 +98,16 @@ private function mapBasic(array $field, string $type)
9898
];
9999
}
100100

101+
102+
private function mapMessage(array $field): array
103+
{
104+
$mapped = $this->mapBasic($field, 'message');
105+
106+
$mapped['message'] = $field['message'] ?? '';
107+
108+
return $mapped;
109+
}
110+
101111
private function mapGoogleMap(array $field): array
102112
{
103113
$mapped = $this->mapBasic($field, 'googleMap');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@typography([
22
'attributeList' => $field['attributeList'],
33
])
4-
HELLO
4+
{{ $field['message'] }}
55
@endtypography

0 commit comments

Comments
 (0)