VirtueMart Forum

VirtueMart 2 + 3 => Product creation => Topic started by: OpenGlobal on January 08, 2012, 10:26:25 am

Title: Custom Fields: Is a List
Post by: OpenGlobal 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?
Title: Re: Custom Fields: Is a List
Post by: OpenGlobal 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
Title: Re: Custom Fields: Is a List
Post by: OpenGlobal on January 11, 2012, 13:51:59 pm
Anyone?

Title: Re: Custom Fields: Is a List
Post by: OpenGlobal 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.
Title: Re: Custom Fields: Is a List
Post by: PRO on January 11, 2012, 21:32:51 pm
openglobal, thats when you put the default value 1st in the list

Title: Re: Custom Fields: Is a List
Post by: OpenGlobal on January 11, 2012, 23:11:34 pm
So I guess that's a regression then.
Title: Re: Custom Fields: Is a List
Post by: OpenGlobal 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?