Hello - we are running into an issue where we use Gravity Forms to connect to a user database, we have a user that consistently uses an accented i in their username and it does work to connect to the database but doesn’t work when we try to display the submission data in a view.
I feel like the easiest solution is to require no accented characters using field validation but it is not working, I tried the snippet below, it works if I replace the í with @,$,% etc. but it won’t work with the í :
add_filter( 'gform_field_validation_14_70', 'validate_userid', 10, 4 );
function validate_userid( $result, $value, $form, $field ) {
if ( $result['is_valid'] && (mb_strpos($value , 'í') !== false)) {
$result['is_valid'] = false;
$result['message'] = 'Only standard characters are allowed';
}
return $result;
}