Phone Cursor starting at end only on Windows (non-Mac) computers

My client is complaining that the Gravity forms cursor for the Gravity Forms Phone Number is defaulting to the end. He is on a Windows Machine (non-Mac). I’m on a Mac and don’t have the issue. The phone cursor defaults to the front. I’ve also determined that if he turns off Google Chrome auto-fill that the issue goes away and the cursor defaults to the front.

I followed the instructions here: Position caret in Phone Field [RESOLVED] - #3 by user561. I’ve installed the Javascript into the wp_head. It’s not working for me. I’m not sure I’m calling the right class though as my Gravity form is shortcoded into Elementor?

If someone would help me to determine if I’m calling the right class, I’d appreciate it. Or if you have a solution that is working, I’d appreciate it. The website url is: https://groupsrecovery.flywheelsites.com/jessica-kent/

Hello,

I use the following script to disable the date field from autocomplete popup. It should work for your phone field because it disables autocomplete. This code goes in functions.php.

/**
 * Disable phone field autocomplete popup
 *
 * @param string $input field HTML markup
 * @param object $field GForm field object
 *
 * @return string
 */

function gform_remove_phone_autocomplete( $input, $field ) {
	if ( is_admin() ) {
		return $input;
	}
	if ( GFFormsModel::is_html5_enabled() && $field->type == 'phone' ) {
		$input = str_replace( '<input', '<input autocomplete="off" ', $input );
	}

	return $input;
}

add_filter( 'gform_field_content', 'gform_remove_phone_autocomplete', 11, 2 );

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.