Fields should be allowed to be inside other tags as long as they're
contained in an af-fieldset.
foreach (pq('af-field', $doc) as $afField) {
/** @var DOMElement $afField */
$fieldName = $afField->getAttribute('name');
- $entityName = pq($afField)->parent('[af-fieldset]')->attr('af-fieldset');
+ $entityName = pq($afField)->parents('[af-fieldset]')->attr('af-fieldset');
if (!preg_match(';^[a-zA-Z0-9\_\-\. ]+$;', $entityName)) {
throw new \CRM_Core_Exception("Cannot process $path: malformed entity name ($entityName)");
}
<div af-fieldset="parent">
<h3>About You</h3>
- <af-field name="first_name" />
- <af-field name="last_name" />
+ <div class="af-block">
+ <af-field name="first_name" />
+ <af-field name="last_name" />
+ </div>
<af-field name="gender_id" />
<af-field name="constituent_information.Marital_Status" />
<af-field name="constituent_information.Marriage_Date" />