Just completed a new form using eForm and wanted to test it.
Loads of problems
- so checked what was wrong - the problem is that the latest version of eForm still doesn't support all of the HTML5 input values.
So, researched the forum and found
this post from 3 1/2 years ago.
If anyone is interested, I have updated my version of eForm to cater for all of the current HTML5 input values, based on the forum post from Mazso and it now all works.
Open up "assets => snippets => eform => eform.inc.php" and change this:
case "option":
return "<$tag$t value=".$quotedValue." [+$name:$val+]>";
case "input":
switch($type){
case 'radio':
case 'checkbox':
return "<input$t value=".$quotedValue." [+$name:$val+] />";
case 'text':
if($name=='vericode') return "<input$t value=\"\" />";
//else pass on to next
case 'password':
return "<input$t value=\"[+$name+]\" />";
default: //leave as is - no placeholder
return "<input$t value=".$quotedValue." />";
}
case "file": //no placeholder!
To this:
case "option":
return "<$tag$t value=".$quotedValue."[+$name:$val+]>";
case "input":
switch($type){
case 'radio':
case 'checkbox':
return "<input$t value=".$quotedValue." [+$name:$val+] />";
case 'text':
if($name=='vericode') return "<input$t value=\"\" />";
//else pass on to next
// Added HTML5 types 29.01.2015
case 'email':
case 'url':
case 'date':
case 'number':
case 'search':
case 'color':
case 'range':
case 'time':
case 'month':
case 'week':
case 'datetime':
case 'datetime-local':
case 'tel':
return "<input$t value=\"\" />";
//else pass on to next
// End - Added HTML5 types
case 'password':
return "<input$t value=\"[+$name+]\" />";
default: //leave as is - no placeholder
return "<input$t value=".$quotedValue." />";
}
case "file": //no placeholder!
I have left the XHTML closing slash "/>" as I can imagine other users still use XHTML. HTML5 is backwards compatible so it doesn't matter if its there when coding HTML5.
UPDATE 1: Just cleaned up / simplified the amount of "return" code needed
UPDATE 2: Further modifications can be found here:
eForm - Doesn't Remember "Input Type=?" Values on Error
[ed. note: iusemodx last edited this post 9 years, 3 months ago.]