Filed name with spaces

Archived from the Xataface Users forum.

etsoft — Mon Aug 15, 2011 5:26 am

Hi,

i have a field with some spaces : Vestrock contact person

In the fields.ini file i have :

[Vestrock contact person]
[Vestrock contact person]
widget:type=select
vocabulary=Vestrock contact person

In the valuelists.ini i have :

[Vestrock contact person]
Erwin=Erwin
Margo=Margo
Jan=Jan
Kees=Kees

The selection is possible but the value is not saved.
Is this not correct ?/

Regards
Erwin


cyberws — Mon Aug 15, 2011 8:43 am

Try putting quotes around the values saved:

“Erwin”=Erwin
“Margo”=Margo
“Jan”=Jan
“Kees”=Kees


shannah — Mon Aug 15, 2011 11:54 am

Field names cannot have spaces.
You can specify a label for a field using the widget:label directive.
e.g.

Code: Select all
[Vestrock_contact_person] widget:type=select vocabulary=Vestrock contact person widget:label = "Vestrock contact person"

Although Xataface will generate labels by replacing underscores with spaces anyways so in this particular case you could omit the widget:label directive and it would give the same result.