valuelist

Archived from the Xataface Users forum.

driedfruit — Tue Jun 26, 2012 8:20 am

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.


shannah — Tue Jun 26, 2012 11:02 pm

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


driedfruit — Wed Jun 27, 2012 11:10 am

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.


shannah — Wed Jun 27, 2012 12:30 pm

Oh. The radio widget hasn’t been implemented. You’ll need to use either select or checkbox.


driedfruit — Wed Jun 27, 2012 4:00 pm

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?


driedfruit — Fri Jun 29, 2012 6:53 pm

Anyone know how to make it update every time I change the valuelist and fields ini files?


shannah — Fri Jun 29, 2012 7:11 pm

Are you using output caching?


driedfruit — Sat Jun 30, 2012 12:51 pm

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.


shannah — Wed Jul 04, 2012 10:29 am

This is your template cache. You don’t need to empty this out. It is for the smarty compiled templates.