- Issue created by @bogdan.racz
- 🇷🇴Romania bogdan.racz
Pushed the update.
https://git.drupalcode.org/project/phone_number/-/merge_requests/31/diffsPlease review.
Thanks!
When using the Phone Number (field) module the integration with the Webform Submission Export/Import functionality is incomplete.
This is due to the fact that in the PhoneNumber class definition which extends the WebformCompositeBase the getCompositeElements() method returns an empty array.
See WebformAddress element.
In the WebformSubmissionExportImportImporter class, the method getDestinationColumns provides the columns based also on the composite elements.
$composite_elements = $element_plugin->getCompositeElements();
Update the PhoneNumber class to include the composite elements:
/**
* {@inheritdoc}
*/
public function getCompositeElements() {
$elements = [];
$elements['value'] = [
'#title' => $this->t('Value'),
'#type' => 'textfield',
];
$elements['country'] = [
'#title' => $this->t('Country'),
'#type' => 'textfield',
];
$elements['local_number'] = [
'#title' => $this->t('Local number'),
'#type' => 'textfield',
];
$elements['extension'] = [
'#title' => $this->t('Extension'),
'#type' => 'textfield',
];
return $elements;
}
Active
2.0
Code
Pushed the update.
https://git.drupalcode.org/project/phone_number/-/merge_requests/31/diffs
Please review.
Thanks!