public static function YamlFormName::getCompositeElements in YAML Form 8
Same name in this branch
- 8 src/Element/YamlFormName.php \Drupal\yamlform\Element\YamlFormName::getCompositeElements()
- 8 src/Plugin/YamlFormElement/YamlFormName.php \Drupal\yamlform\Plugin\YamlFormElement\YamlFormName::getCompositeElements()
Get a renderable array of form elements.
Return value
array A renderable array of form elements, containing the base properties for the composite's form elements.
Overrides YamlFormCompositeBase::getCompositeElements
1 call to YamlFormName::getCompositeElements()
- YamlFormName::getCompositeElements in src/
Plugin/ YamlFormElement/ YamlFormName.php - Get composite elements.
File
- src/
Element/ YamlFormName.php, line 15
Class
- YamlFormName
- Provides a form element for an name element.
Namespace
Drupal\yamlform\ElementCode
public static function getCompositeElements() {
$elements = [];
$elements['title'] = [
'#type' => 'yamlform_select_other',
'#title' => t('Title'),
'#options' => 'titles',
];
$elements['first'] = [
'#type' => 'textfield',
'#title' => t('First'),
];
$elements['middle'] = [
'#type' => 'textfield',
'#title' => t('Middle'),
];
$elements['last'] = [
'#type' => 'textfield',
'#title' => t('Last'),
];
$elements['suffix'] = [
'#type' => 'textfield',
'#title' => t('Suffix'),
];
$elements['degree'] = [
'#type' => 'textfield',
'#title' => t('Degree'),
];
return $elements;
}