Author Topic: Bug in JavaScript validation Registration Form  (Read 3048 times)

afmol

  • Beginner
  • *
  • Posts: 1
Bug in JavaScript validation Registration Form
« on: January 04, 2011, 16:14:49 pm »
Description:
When submitting the registration form as a new user, the required title field is not validated. When a user does not select a title he will not be notified by a red label. In our particular case this resulted in a blanco page with only the contents of the shopping cart

VirtueMart Version:

1.1.5

Joomla/Mambo Version:
1.5.20

Steps to replicate:

Submit registration form without choosing title

Proposed fix(es):
In

administrator/components/com_virtuemart/classes/ps_userfield.php

line 693:

if(formelement.selectedIndex.value == '') {

This is not valid JavaScript. I changed it to:

if (formelement.options[formelement.selectedIndex].value == '') {

and the problem was solved!

zanardi

  • Contributing Developer
  • Full Member
  • *
  • Posts: 878
    • GiBiLogic
Re: Bug in JavaScript validation Registration Form
« Reply #1 on: January 04, 2011, 19:15:23 pm »
Did you already try VirtueMart 1.1.6?
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter