Custom form element template for a gender selection field. Render the field wrapper with optional fieldset and legend Apply error class if validation errors exist {f:if( condition: '{validationResults.errors}', then: 'is-invalid' )} Radio button group container
Loop through all available options (e.g., male, female, diverse) Set ARIA attributes for accessibility Add error indication to the first radio button if validation fails Individual radio button container
Display validation errors {formvh:translateElementError(element: element, error: error)}