That would defeat the purpose of a captcha which needs a server side to verify the reponse.
You can implement your own Form elements along the lines of:
class MyCaptchaFormElement extends AbstractFormElement
{
/**
* @param FormRuntime $formRuntime
* @param mixed $elementValue
* @throws InfiniteRedirectionException
* @throws FormDefinitionConsistencyException
*/
public function onSubmit(FormRuntime $formRuntime, &$elementValue)
{
if (empty($elementValue)) {
return;
}
// use $this->getProperties() to get the form element's configuration
// validate the $elementValue (e.g. by sending it to some 3rd party service)
if (!$success) {
$processingRule = $this->getRootForm()->getProcessingRule($this->getIdentifier());
$processingRule->getProcessingMessages()->addError(new Error('Captcha failed. Please try again.', 12345678));
}
}
}
To make that work you need to configure the Form Element and set it’s implementationClassName option.
Take a look at existing custom Form Elements for inspiration.