News:

Support the VirtueMart project and become a member

Main Menu

Bug in JavaScript validation Registration Form

Started by afmol, January 04, 2011, 16:14:49 PM

Previous topic - Next topic

afmol

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

--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter