VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: afmol on January 04, 2011, 16:14:49 PM

Title: Bug in JavaScript validation Registration Form
Post by: afmol 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!
Title: Re: Bug in JavaScript validation Registration Form
Post by: zanardi on January 04, 2011, 19:15:23 PM
Did you already try VirtueMart 1.1.6?