Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-08-21 00:52:43

emeaguiar
New Member
Registered: 2010-07-13
Posts: 5
Website

Add type="email" to email input

This may be an unnecessary question, I just want to know if there’s a way to change the type attribute of the commentform’s input tag, so intead of:

<input type="text" id="email" class="comment_email_input" size="25" name="email" value="">

It shows:

<input type="email" id="email" class="comment_email_input" size="25" name="email" value="">

I’ve been looking everywhere but couldn’t find anything yet, so I’m asking here.

Offline

#2 2010-08-21 01:17:42

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Add type="email" to email input

Are you going for HTML5 draft? In current HTML4 and XHMTL there is no such value.

Anyhow, you could try rah_replace. Something like:

<txp:rah_replace from="<input type=""text""" to="<input type=""email""">
	<txp:comment_email_input />
</txp:rah_replace>

Offline

#3 2010-08-21 01:35:04

emeaguiar
New Member
Registered: 2010-07-13
Posts: 5
Website

Re: Add type="email" to email input

Yes I’m going for HTML5 (this was the last thing to do) and thank you!, that worked, now my site is fully HTML5 :P

Offline

Board footer

Powered by FluxBB