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

issues/138--metadatadate-validation-error --> 1.0.0 #139

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

Conversation

patdunlavey
Copy link
Collaborator

See #138

  • implemented override of getElementSelectorInputValue()

Here we create a special purpose override of \Drupal\webform\Plugin\WebformElementBase::getElementSelectorInputValue at \Drupal\webform_strawberryfield\Plugin\WebformElement\MetadataDateBase::getElementSelectorInputValue
It attempts to apply the selector to the MetadataDateBase form element and get the value. We handle both single and multiple value versions of the field. If the selector results in an array,
we return it unless it is empty. This will trigger a array to string conversion notice downstream in \Drupal\webform\WebformSubmissionConditionsValidator::checkConditionTrigger, but that's ok/appropriate.

… getElementSelectorInputValue()

Here we create a special purpose override of \Drupal\webform\Plugin\WebformElementBase::getElementSelectorInputValue at \Drupal\webform_strawberryfield\Plugin\WebformElement\MetadataDateBase::getElementSelectorInputValue
It attempts to apply the selector to the MetadataDateBase form element and get the value. We handle both single and multiple value versions of the field. If the selector results in an array,
we return it unless it is empty. This will trigger a array to string conversion notice downstream in \Drupal\webform\WebformSubmissionConditionsValidator::checkConditionTrigger, but that's ok/appropriate.
@DiegoPino
Copy link
Member

@patdunlavey when you say

"his will trigger a array to string conversion notice downstream in \Drupal\webform\WebformSubmissionConditionsValidator::checkConditionTrigger, but that's ok/appropriate."

Can we fix that?

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