/**
 * Method to react on the setup of a captcha field. Gives the possibility
 * to change the field and/or the XML element for the field.
 *
 * @param   \Joomla\CMS\Form\Field\CaptchaField  $field    Captcha field instance
 * @param   \SimpleXMLElement                    $element  XML form definition
 *
 * @return void
 */
public function setupField(\Joomla\CMS\Form\Field\CaptchaField $field, \SimpleXMLElement $element)
{
    if ($this->captcha === null) {
        return;
    }
    $arg = ['field' => $field, 'element' => $element];
    $result = $this->update('onSetupField', $arg);
    return $result;
}