Author Topic: Custom Fields: Is a List  (Read 5441 times)

OpenGlobal

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 316
    • OpenGlobal E-commerce Web Design in Gloucester
Custom Fields: Is a List
« on: January 08, 2012, 10:26:25 am »
What is this feature for? It doesn't seem to do anything other than turn the field into a useless empty "list". I can't find any way of populating the list other than by giving a default value. but that gives the option of the default or nothing at all.

How do we just create a dropdown list of options?

OpenGlobal

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 316
    • OpenGlobal E-commerce Web Design in Gloucester
Re: Custom Fields: Is a List
« Reply #1 on: January 08, 2012, 10:27:51 am »
The Is a List option isn't even mentioned in the "documentation":

http://dev.virtuemart.net/projects/virtuemart/wiki/Product_custom_fields_without_stock_control

OpenGlobal

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 316
    • OpenGlobal E-commerce Web Design in Gloucester
Re: Custom Fields: Is a List
« Reply #2 on: January 11, 2012, 13:51:59 pm »
Anyone?


OpenGlobal

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 316
    • OpenGlobal E-commerce Web Design in Gloucester
Re: Custom Fields: Is a List
« Reply #3 on: January 11, 2012, 20:08:55 pm »
Ah ha! Thanks to firebug and trawling through the code, I've managed to work this out.

If using "Is a List" to create a drop down list, the "Default" field becomes the "Possible Values" field. You put in the possible values separated by a ';'.

The question now then, how do you specify a default value if the "Default" field is being used for something else? Looking at the code, it seems this functionality is absent.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Custom Fields: Is a List
« Reply #4 on: January 11, 2012, 21:32:51 pm »
openglobal, thats when you put the default value 1st in the list

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

OpenGlobal

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 316
    • OpenGlobal E-commerce Web Design in Gloucester
Re: Custom Fields: Is a List
« Reply #5 on: January 11, 2012, 23:11:34 pm »
So I guess that's a regression then.

OpenGlobal

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 316
    • OpenGlobal E-commerce Web Design in Gloucester
Re: Custom Fields: Is a List
« Reply #6 on: January 11, 2012, 23:21:20 pm »
The next question is how to change the drop down after it's been set. After the custom field has been saved, you get a nice ajax-y dropdown instead of the standard HTML select, but it doesn't do anything, all of the other options have been removed. The only way to change the value is to remove the custom field and add it back in again.

Am I missing something?