Support » Plugin: Contact Form 7 » Support for inputmode attrib

Viewing 1 replies (of 1 total)
  • Hi @aglyons

    I was looking for the same and came up with this solution as a mu-plugin

    
    add_filter( 'wpcf7_form_elements', function ($content) {
    	$content = str_replace("type=\"url\"", "inputmode=\"url\" type=\"url\"", $content);
    	$content = str_replace("type=\"email\"", "inputmode=\"email\" type=\"email\" autocomplete=\"email\"", $content);
    	return $content;
    });
    

    Would love to see a more robust solution by @takayukister

Viewing 1 replies (of 1 total)
  • The topic ‘Support for inputmode attrib’ is closed to new replies.