-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Rename FormField Value to getFormattedValue #1306
base: 6.0
Are you sure you want to change the base?
API Rename FormField Value to getFormattedValue #1306
Conversation
554552d
to
b420ad1
Compare
f2633f7
to
4fd13fe
Compare
4fd13fe
to
54e3edf
Compare
54e3edf
to
9835716
Compare
$params = [$fieldName, $messageText, $messageType, null, $messageCast]; | ||
$params = [$fieldName, $messageText, $messageType, '', $messageCast]; | ||
$validationResultWithNameSpaces->addFieldError(...$params); | ||
} else { | ||
$validationResultWithNameSpaces->addError($messageText, $messageType, null, $messageCast); | ||
$validationResultWithNameSpaces->addError($messageText, $messageType, '', $messageCast); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem relevant? Looks like #1311 accidentally snuck into this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably makes sense to block this PR until the other one is merged, then rebase this PR and these changes should vanish
$showTitle->Value() === 'Yes' ? $displayedText : $notDisplayedText | ||
// Intentionally using getValue() instead of getFormattedValue() to get the raw value | ||
$showTitle->getValue() === 'Yes' ? $displayedText : $notDisplayedText |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want to check against the raw value here? ShowTitle
is a CheckboxField
which will by default use ints 1
and 0
(but probably allows other value types) so this condition will often fail.
Issue silverstripe/silverstripe-framework#11468