Webform module and config export
This commit is contained in:
parent
3e6a5cbed2
commit
0e15467384
1040 changed files with 117682 additions and 0 deletions
37
web/modules/contrib/webform/src/Element/WebformContact.php
Normal file
37
web/modules/contrib/webform/src/Element/WebformContact.php
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in a new issue