VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: julos0877 on May 15, 2017, 14:30:08 PM

Title: Registration : Checkbox required does not work
Post by: julos0877 on May 15, 2017, 14:30:08 PM
Hi Virtuemart team,

I am surprised that the checkbox required in the registration form does not work yet.
If we add for example the "terms of service" check box in the registration form as required field, we can see the asterix on the label (*) but it's still possible to valid the form without check it.
After that, the account is created but last name, first name and other virtuemart fields were not taken in consideration and these fields are empty.

Do we not have the possibility to add this validation in the function myValidator?

Thanks in advance
Title: Re: Registration : Checkbox required does not work
Post by: Jörgen on May 15, 2017, 14:35:57 PM
Hello

What VM and Joomla versions do You use ?

This sounds like it could be a JavaScript issue. Have You tried with the protostar template ?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Registration : Checkbox required does not work
Post by: julos0877 on May 15, 2017, 15:33:53 PM
Hi Jorgen,

Thanks for your reply.
VirtueMart 3.2.1 and Joomla 3.7.0

Yes of course, same issue with protostar.

Did you do the test? If so, could you share the test url to compare the code?

Many tahnks in advane
Title: Re: Registration : Checkbox required does not work
Post by: Milbo on May 15, 2017, 17:27:02 PM
I wonder if you set it up correctly per userfield.
Title: Re: Registration : Checkbox required does not work
Post by: julos0877 on May 15, 2017, 19:27:54 PM
Hi Milbo,

See atached the screenshot of the userfield.
I tried with another one but same result.
Title: Re: Registration : Checkbox required does not work
Post by: Milbo on May 15, 2017, 19:54:36 PM
Interesting, yes. The custom userfield "tos" works as expected, but not the standard checkboxes. I wonder, cant be hard to fix
Title: Re: Registration : Checkbox required does not work
Post by: julos0877 on May 16, 2017, 08:51:41 AM
Hey Milbo,

Happy to see that I'mnot crazy :-)

Hope you will succeed to solve this.
Title: Re: Registration : Checkbox required does not work
Post by: Jumbo! on May 16, 2017, 17:40:25 PM
Change the field name to "tos" instead of "tos_agreed". You will need to create a new one and unpublish the existing one. The type of the field should be "custom".

Next go to VirtueMart Configuration and enable the option called "Must agree to Terms of Service on EVERY ORDER".

Now check again.
Title: Re: Registration : Checkbox required does not work
Post by: Milbo on May 16, 2017, 21:07:33 PM
yeh, then he just uses the custom layout for the tos.

And I think the checkbox stuff works in the cart, but not for the addresses. He is right, it should be fixed, but atm it has a very low priority. julos you can speed this up by supporting the project, buying a membership and write a ticket that you wanna have this fixed. greets

https://extensions.virtuemart.net/support/virtuemart-supporter-membership-bronze-detail
http://extensions.virtuemart.net/ticket