Webform module and config export

This commit is contained in:
Rob Davies 2017-03-16 15:29:07 +00:00
parent 3e6a5cbed2
commit 0e15467384
1040 changed files with 117682 additions and 0 deletions

View file

@ -0,0 +1,37 @@
<?php
namespace Drupal\webform\Element;
/**
* Provides a webform element for a contact element.
*
* @FormElement("webform_contact")
*/
class WebformContact extends WebformAddress {
/**
* {@inheritdoc}
*/
public static function getCompositeElements() {
$elements = [];
$elements['name'] = [
'#type' => 'textfield',
'#title' => t('Name'),
];
$elements['company'] = [
'#type' => 'textfield',
'#title' => t('Company'),
];
$elements['email'] = [
'#type' => 'email',
'#title' => t('Email'),
];
$elements['phone'] = [
'#type' => 'tel',
'#title' => t('Phone'),
];
$elements += parent::getCompositeElements();
return $elements;
}
}