VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: guybr on January 04, 2015, 12:05:21 PM

Title: how to overcome "missing value" error on registration page?
Post by: guybr on January 04, 2015, 12:05:21 PM
Hi, in VM 2.6.6 the registration field for "State / Province / Region" is required - but has no values. If a user enters a country that has no values in that field, he gets an error.

Where can I change the status of that field to being non-required?
Title: Re: how to overcome "missing value" error on registration page?
Post by: GJC Web Design on January 04, 2015, 12:25:24 PM
just tested on a clean 2.6.12 install

set state to required

selected country with no states set

validation was ignored and could register

mind you with State required the validation was also ignored even for countries with states

no required="required" set on State even though the asterisk appears... hmmmmm ... does required="required" appear on your State option?

Title: Re: how to overcome "missing value" error on registration page?
Post by: guybr on January 04, 2015, 13:37:34 PM
judging by the form on the user.html page, yes.

Oddly, on the backend, my test account details were saved - but I can't log in.

What file controls that form?
Title: Re: how to overcome "missing value" error on registration page?
Post by: GJC Web Design on January 04, 2015, 13:44:30 PM
models/user.php
Title: Re: how to overcome "missing value" error on registration page?
Post by: guybr on January 04, 2015, 14:17:15 PM
...I'm not managing to find it: I checked com_users but I don't have such a file in the "models" directory, I also checked com_virtuemart but didn't find anything relevant in the "user" subdirectory -?
Title: Re: how to overcome "missing value" error on registration page?
Post by: GJC Web Design on January 04, 2015, 14:44:19 PM
Instead of getting involved in core hacking I would recommend you work out a javascript solution to this
Title: Re: how to overcome "missing value" error on registration page?
Post by: guybr on January 04, 2015, 14:46:51 PM
...but what page / code am I trying to work from? I can't find the source code for the VM registration form...
Title: Re: how to overcome "missing value" error on registration page?
Post by: guybr on January 04, 2015, 15:16:17 PM
the solution may be easier than making an override: to edit the fields on the VM registration page, just go to admin configuration and look for the "shopper fields" screen. There you can select/de-select fields and their necessity for completing registration
Title: Re: how to overcome "missing value" error on registration page?
Post by: GJC Web Design on January 04, 2015, 16:03:22 PM
well - I assumed you had already checked the option you wanted there!!!!