Author Topic: make customer comment field required at checkout in VM 2.6.22  (Read 1358 times)

6.522

  • Beginner
  • *
  • Posts: 20
  • A beginner
Hi, I know this is covered in VM 3x now but I need a solution to make a customer comment field required at checkout in VM 2.6.22, please :) - without updating to VM 3x ;)
Regards

my joomla ver 2.5.28

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9480
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: make customer comment field required at checkout in VM 2.6.22
« Reply #1 on: April 08, 2016, 23:06:49 pm »
jquery snippet to disable the chk out button until comment is filled
or hack the vm validation script to incl comment

or does the textarea just need a required class etc?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

6.522

  • Beginner
  • *
  • Posts: 20
  • A beginner
Re: make customer comment field required at checkout in VM 2.6.22
« Reply #2 on: April 08, 2016, 23:44:09 pm »
Hey, thanks for the tips! :) Yes I just need something that will not allow user to complete the check out if the comment field is empty - the simplest solution that will do the job. :)
Regards

6.522

  • Beginner
  • *
  • Posts: 20
  • A beginner
Re: make customer comment field required at checkout in VM 2.6.22
« Reply #3 on: April 09, 2016, 18:03:03 pm »
Ok, so I ended up adding the "required" attribute to the textarea - as you suggested - and it works. :) The downside is IE9 (and lower) does not support this - is there a way to do sth about it?
Regards

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27669
  • Always on vacation
    • Jenkin Hill Internet
Re: make customer comment field required at checkout in VM 2.6.22
« Reply #4 on: April 09, 2016, 19:29:37 pm »
Detect that old browser and send them to an update site? Or link to https://www.microsoft.com/en-gb/WindowsForBusiness/End-of-IE-support

Alternatively you may have to hack the validation script.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.11.10291 on Joomla 3.9.16 PHP 7.0.33

6.522

  • Beginner
  • *
  • Posts: 20
  • A beginner
Re: make customer comment field required at checkout in VM 2.6.22
« Reply #5 on: April 10, 2016, 22:03:18 pm »
Thanks! I think I will leave it as it is for now, but if I would decide to change the validation script where should I start with?
Regards