I have a form set up to replace the multisite registration process, fairly standard. It has a re-captcha field. The one thing it does that deviates from the norm, is that it generates the username randomly with a filter much like this:
add_filter( 'gform_field_value_my_custom_field_name', 'gform_field_value_my_custom_field_name' );
function gform_field_value_my_custom_field_name( $value ){
error_log( "GForm Filter Triggered" );
while( !$value ) :
$value = 'textstring' . sprintf( "%05d", rand(0,99999) );
endwhile;
return $value;
}
This works without the re-captcha. However, with it on, the filter does not run.