Author Topic: drop down (single select) - Required to choose an option  (Read 778 times)

blackrat999

  • Jr. Member
  • **
  • Posts: 182
drop down (single select) - Required to choose an option
« 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?


blackrat999

  • Jr. Member
  • **
  • Posts: 182
Re: drop down (single select) - Required to choose an option
« Reply #1 on: November 28, 2017, 11:20:14 am »
Anyone please?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2900
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: drop down (single select) - Required to choose an option
« Reply #2 on: December 05, 2017, 00:26:50 am »
Why not using first option as a valid option ?

blackrat999

  • Jr. Member
  • **
  • Posts: 182
Re: drop down (single select) - Required to choose an option
« Reply #3 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?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2900
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: drop down (single select) - Required to choose an option
« Reply #4 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

blackrat999

  • Jr. Member
  • **
  • Posts: 182
Re: drop down (single select) - Required to choose an option
« Reply #5 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

blackrat999

  • Jr. Member
  • **
  • Posts: 182
Re: drop down (single select) - Required to choose an option
« Reply #6 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

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2900
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y

blackrat999

  • Jr. Member
  • **
  • Posts: 182
Re: drop down (single select) - Required to choose an option
« Reply #8 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?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2900
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: drop down (single select) - Required to choose an option
« Reply #9 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