VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: blackrat999 on November 14, 2017, 16:35:42 PM

Title: drop down (single select) - Required to choose an option
Post by: blackrat999 on November 14, 2017, 16:35:42 PM
I have setup a drop down box in the "shopper Fields" checkout so the user can state where they heard about the shop. This is set as "required" but i cant figure out how to have -Select- at the top so they have to choose an option. I can add Select as an option and hope they change it to a valid option but they dont !!

Personally i wouldnt have this as an extra way to put the customer off buying but my client wants it!

How can i achieve this please?

Title: Re: drop down (single select) - Required to choose an option
Post by: blackrat999 on November 28, 2017, 11:20:14 AM
Anyone please?
Title: Re: drop down (single select) - Required to choose an option
Post by: Studio 42 on December 05, 2017, 00:26:50 AM
Why not using first option as a valid option ?
Title: Re: drop down (single select) - Required to choose an option
Post by: blackrat999 on December 05, 2017, 09:25:54 AM
Thanks for taking the time to reply but i dont understand what you mean, can you expand a bit please?
Title: Re: drop down (single select) - Required to choose an option
Post by: Studio 42 on December 05, 2017, 12:26:29 PM
The userfields options cannot be set as required in core.
so adding -Select- mean select is valid, so better not use it and set the first option as the most common option
Title: Re: drop down (single select) - Required to choose an option
Post by: blackrat999 on December 05, 2017, 12:32:38 PM
That is the point really it works fine but i cant get "Select" to NOT be a chosen option. If i remove it and leave it as the most preferred option then i dont get the correct response from the user as they just leave it on what it is.
i want it to be like the Country and Title fields so that they HAVE to change it from --Select--
Can you explain how i can achieve this please?
many thanks
Title: Re: drop down (single select) - Required to choose an option
Post by: blackrat999 on December 13, 2017, 10:26:15 AM
This must be "possible" ?
If anyone wants to quote me for achieving it there is a small budget available.

thanks
Title: Re: drop down (single select) - Required to choose an option
Post by: Studio 42 on December 13, 2017, 11:50:30 AM
See https://shop.st42.fr/en/products/shortcodes.htm
The demo http://pro.st42.fr/en/shortcodes/test-product-no4.html
And the documentation https://shop.st42.fr/en/shorcodes-english-doc#cart_list (screenshot are in french)
Title: Re: drop down (single select) - Required to choose an option
Post by: blackrat999 on December 13, 2017, 12:32:32 PM
Ah that looks perfect - will i be able to put a dropdown selection box that must be selected before you can purchase anything?
and put it anywhere in the cart?
Title: Re: drop down (single select) - Required to choose an option
Post by: Studio 42 on December 13, 2017, 13:23:07 PM
The demo have an empty option.
If you dont select another option, you cannot purchase the product.
The plugin have a  required  and a  empty option  setting.
If you set empty option to YES, then the value set in the placeHolder is displayed(by default choose a variant)
If you set required to YES, then the list is always controlled and need to have a valid option.
It's controlled by PHP and cannot be hacked, you can remove the value from the form this get always controlled