function _yamlform_test_test_element_html_markup_recursive in YAML Form 8
Add HTML markup to elements.
Parameters
array $elements: An array of elements.
1 call to _yamlform_test_test_element_html_markup_recursive()
- yamlform_test_test_element_html_markup in tests/
modules/ yamlform_test/ includes/ yamlform_test.test_element_html_markup.inc - Generate examples of all elements using HTML markup.
File
- tests/
modules/ yamlform_test/ includes/ yamlform_test.test_element_html_markup.inc, line 28
Code
function _yamlform_test_test_element_html_markup_recursive(array &$elements) {
foreach ($elements as $key => &$property) {
if (in_array($key, [
'#title',
'#field_prefix',
'#field_suffix',
])) {
$property = '<u>' . $property . '</u>';
}
if (is_array($property)) {
_yamlform_test_test_element_html_markup_recursive($property);
}
}
}