Skip to content
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

Open
wants to merge 1 commit into
base: 6.0
Choose a base branch
from

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz force-pushed the pulls/6.0/rename-ffv branch 2 times, most recently from 554552d to b420ad1 Compare January 21, 2025 02:53
@emteknetnz emteknetnz force-pushed the pulls/6.0/rename-ffv branch 3 times, most recently from f2633f7 to 4fd13fe Compare January 24, 2025 02:26
@emteknetnz emteknetnz force-pushed the pulls/6.0/rename-ffv branch from 4fd13fe to 54e3edf Compare January 29, 2025 22:42
@emteknetnz emteknetnz force-pushed the pulls/6.0/rename-ffv branch from 54e3edf to 9835716 Compare January 31, 2025 07:41
@emteknetnz emteknetnz marked this pull request as ready for review February 2, 2025 03:46
Comment on lines -459 to +462
$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);
Copy link
Member

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?

Copy link
Member Author

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

Comment on lines -106 to +107
$showTitle->Value() === 'Yes' ? $displayedText : $notDisplayedText
// Intentionally using getValue() instead of getFormattedValue() to get the raw value
$showTitle->getValue() === 'Yes' ? $displayedText : $notDisplayedText
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants