Formbuilder using HTML5 <input type="email" />

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
cypher6x
Forum Members
Forum Members
Posts: 13
Joined: Mon Jul 09, 2012 11:27 am

Formbuilder using HTML5 <input type="email" />

Post by cypher6x »

Hi

I am using FormBuilder 0.7.3 on CMSMS 1.11

This has only started with the latest Formbuilder. It is now using HTML 5 http://www.w3.org/TR/html-markup/input.email.html

This is great but my webpages are not HTML5 compliant and I am using a different doctype at the moment so this breaks validation.

See below. Can this be made into an option so people can choose based on their doctype.

The offending code is here

Code: Select all

/modules/FormBuilder/classes/FromEmailAddressField.class.php
function GetFieldInput($id, &$params, $returnid)

		return $mod->fbCreateInputText($id, 'fbrp__'.$this->Id,
			($this->HasValue()?htmlspecialchars($this->Value, ENT_QUOTES):$default),
			25,128,$html5.$js.$this->GetCSSIdTag(),'email');
Changing "email" above to "text" solves the problem.

Code: Select all

Line 503, Column 110: value of attribute "type" cannot be "email"; must be one of "text", "password", "checkbox", "radio", "submit", "reset", "file", "hidden", "image", "button"…Address  (*)</label><input type="email" name="m525a2fbrp__74" value="" size="2…
✉


The value of the attribute is defined to be one of a list of possible values but in the document it contained something that is not allowed for that type of attribute. For instance, the “selected” attribute must be either minimized as “selected” or spelled out in full as “selected="selected"”; a value like “selected="true"” is not allowed.
 
cypher6x
Forum Members
Forum Members
Posts: 13
Joined: Mon Jul 09, 2012 11:27 am

Re: Formbuilder using HTML5 <input type="email" />

Post by cypher6x »

Anyone.......?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Formbuilder using HTML5 <input type="email" />

Post by Dr.CSS »

My understanding is that you have to tell it to use HTML5...
cypher6x
Forum Members
Forum Members
Posts: 13
Joined: Mon Jul 09, 2012 11:27 am

Re: Formbuilder using HTML5 <input type="email" />

Post by cypher6x »

Do you know where that option is or where that parameter is applied?
Dr.CSS wrote:My understanding is that you have to tell it to use HTML5...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Formbuilder using HTML5 <input type="email" />

Post by Dr.CSS »

I've looked and the only HTML5 call I found was in making a field, in Advanced Settings tab...

Use HTML5 placeholder text instead of Javascript:
cypher6x
Forum Members
Forum Members
Posts: 13
Joined: Mon Jul 09, 2012 11:27 am

Re: Formbuilder using HTML5 <input type="email" />

Post by cypher6x »

That is quite separate to the problem I am having. Placeholders are the text that appears in the input field when the user has not entered any text.

I am talking about the type of input field itself.
Dr.CSS wrote:I've looked and the only HTML5 call I found was in making a field, in Advanced Settings tab...

Use HTML5 placeholder text instead of Javascript:
Post Reply

Return to “Modules/Add-Ons”