(Checkout) Checkout Customer Details - Making the form field required

battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Fri, 2013-08-09 04:31

Hi

Love this module, thanks to Alecmyers for all the great work.

Just wondering I could add code to the details.tpl file to make fields required?

Quote:
modules>checkoutemail>templates>Details.tpl

I am just getting nearly all clients not adding in a phone number and would like to make the field required.

Quote:
<script> function ValidateContactForm()
{

"telephone number" -> var="form[telephone],

if (name.telephone == "")
{
window.alert("Please enter your phone number.");
name.focus();
return false;

onsubmit="return ValidateContactForm();"

}</script>

Would this work or am I just complicating things?

cheers


Gallery URL = http://www.secheny.com/gallery/main.php
Gallery version = 2.3.2 core 1.3.0.2
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.4.16 cgi-fcgi
Webserver = Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysqli 5.5.30, lock.system=flock
Toolkits = Thumbnail, LinkItemToolkit, ImageMagick
Acceleration = none/1800, none/1800
Operating system = Linux ld128.inmotionhosting.com 2.6.32-358.6.2.el6.bl1.0.1_1.x86_64 #1 SMP Thu May 30 20:45:26 MDT 2013 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
Rows in GalleryAccessMap table = 1687
Rows in GalleryAccessSubscriberMap table = 14929
Rows in GalleryUser table = 225
Rows in GalleryItem table = 14925
Rows in GalleryAlbumItem table = 253
Rows in GalleryCacheMap table = 0