User Tools

Site Tools


tutorials:zencartmods:emails_fields.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:zencartmods:emails_fields.html [2011/11/15 20:27]
ladyada
tutorials:zencartmods:emails_fields.html [2016/01/28 18:05]
Line 1: Line 1:
  
-====== You have summoned an iPhone/iPad email keyboard! ====== 
- 
-{{:​tutorials:​zencartmods:​photo.jpg?​|}} 
- 
-This mod will change all of your email fields from **type="​text"​** to **type="​email"​** where necessary. 
- 
-This will make it easier for people with iPads and mobile devices to type their email addresses into the field, and will gracefully degrade to **type="​text"​** in browsers that do not support HTML 5. 
- 
-==== includes/​functions/​html_output.PHP ==== 
- 
-Line 369 \\ 
-replace ​ 
-<code php> 
-function zen_draw_input_field($name,​ $value = '',​ $parameters = '',​ $type = '​text',​ $reinsert_value = true) { 
-</​code>​ 
-with 
-<code php> 
-function zen_draw_input_field($name,​ $value = '',​ $parameters = '',​ $type = '​text',​ $reinsert_value = true) { 
-  if(strpos($name,​ '​email'​) !== False && $type == '​text'​) 
-      $type = '​email';​ 
- 
-</​code>​ 
- 
-And thats it! This will work for your login and account creation screens. If you have some other mods that also require email fields, just make sure that they have the string '​email'​ in their names somewhere, and that you're using the **zen_draw_input_field()** function. ​ 
/home/ladyada/public_html/wiki/data/pages/tutorials/zencartmods/emails_fields.html.txt · Last modified: 2016/01/28 18:05 (external edit)