Skip to content

Commit

Permalink
API Rename FormField Value to getFormattedValue
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jan 29, 2025
1 parent 07d4a5d commit 54e3edf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Forms/TextCheckboxGroupField.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function performReadonlyTransformation()
if ($titleField) {
$field->replaceField('Title', LiteralField::create(
'Title',
$titleField->Value()
$titleField->getFormattedValue()
));
}

Expand All @@ -103,7 +103,8 @@ public function performReadonlyTransformation()
if ($showTitle) {
$field->replaceField('ShowTitle', LiteralField::create(
'ShowTitle',
$showTitle->Value() === 'Yes' ? $displayedText : $notDisplayedText
// Intentionally using getValue() instead of getFormattedValue() to get the raw value
$showTitle->getValue() === 'Yes' ? $displayedText : $notDisplayedText
)->addExtraClass('show-title'));
}
}
Expand Down

0 comments on commit 54e3edf

Please sign in to comment.