Page 1 of 1

valuelist

PostPosted: Tue Jun 26, 2012 8:20 am
by driedfruit
I'm having some trouble getting started.

This is my fields.ini
Code: Select all
[standard]
widget:type = radio
vocabulary = YesNo


This is my valuelist.ini
Code: Select all
[YesNo]
1 = Y
0 = N


That changes the standard field to a radio button but it is not populating it with Y and N.

I have tried changing a few other things around like adding
widget:label = "Default"

And it sometimes updates and sometimes doesn't as if it is getting stuck in cache sometimes.

Am I doing something wrong? Do I need to clear any server cache after making updates?

I am clearing browser cache every time. And the server has APC. I am adding &refresh-apc=1 to the end of the url so APC should be refreshed every time as well.

Thanks.

Re: valuelist

PostPosted: Tue Jun 26, 2012 11:02 pm
by shannah
INI files have some reserved values, including 1 and 0. If you want to have 1 or 0 as a key, implement the valuelist either in the database (with __sql__) or in the delegate class (with valuelist__yesno()).

-Steve

Re: valuelist

PostPosted: Wed Jun 27, 2012 11:10 am
by driedfruit
Thanks.

I changed it to
Code: Select all
[YesNo]
y = Yep
n = Nope


and
Code: Select all
[standard]
widget:label = "Default"
widget:type = radio
vocabulary = YesNo


And I am having the same problem.

Re: valuelist

PostPosted: Wed Jun 27, 2012 12:30 pm
by shannah
Oh. The radio widget hasn't been implemented. You'll need to use either select or checkbox.

Re: valuelist

PostPosted: Wed Jun 27, 2012 4:00 pm
by driedfruit
That explains it. Thanks.

The other problem is it sometimes doesn't update.

I'll change it from
Code: Select all
[standard]
widget:label = "Default"
widget:type = checkbox
vocabulary = YesNo


to


Code: Select all
[standard]
widget:label = "Default"
widget:type = select
vocabulary = YesNo



And sometimes it will change between checkbox and select and sometimes it wont. Is there a server cache I need to clear?

Re: valuelist

PostPosted: Fri Jun 29, 2012 6:53 pm
by driedfruit
Anyone know how to make it update every time I change the valuelist and fields ini files?

Re: valuelist

PostPosted: Fri Jun 29, 2012 7:11 pm
by shannah
Are you using output caching?

Re: valuelist

PostPosted: Sat Jun 30, 2012 12:51 pm
by driedfruit
I don't know what that is. It is making temp files in the templates_c/dataface/ folder.

I have tried deleting everything in that folder and get same results.

Re: valuelist

PostPosted: Wed Jul 04, 2012 10:29 am
by shannah
This is your template cache. You don't need to empty this out. It is for the smarty compiled templates.