Date field does not work when group name contains HTML entit

A place for users and developers of the Xataface to discuss and receive support.

Postby ferrante » Sat Aug 26, 2006 10:13 am

Hi,

Here is the description and solution of a problem I ran into yesterday. I have a big table with many fields, so I grouped them with the "group" option of fields.ini. However, a date field did not work: the content was never saved, and if left blank there was no error message, even though I had a validators:required = true option.

The fields.ini options for this field was:

[FechaAlta]
group = "Identificación"
order = 5
widget:label = "Fecha de entrada"
widget:type = "calendar"
validators:required = true

Interestingly, other date field worked perfectly:

[FechaApertura]
group = "Estado"
order = 16
widget:label = "Fecha de apertura"
widget:type = "calendar"
validators:required = true

I realized that FechaAlta worked if I removed the "group" option in fields.ini. Finally, I removed the "ó" HTML entity from the group name (Identificaci—n), and it worked. I played adding other entities, and definitively it was the cause for the field not to work.

I hope this helps someone.

Cheers.
ferrante
 
Posts: 12
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sat Aug 26, 2006 10:31 am

Thanks for pointing this out. Since PHP doesn't handle multibyte chars, any field names and group names should use just the plain old characters.

However you can customize the label of a group as follows:

Code: Select all
[fieldgroup:group1]
label = "Identificaci—n"

[FechaAlta]
group = "group1"
order = 5
widget:label = "Fecha de entrada"
widget:type = "calendar"
validators:required = true



Sorry that this is not documented.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ferrante » Mon Aug 28, 2006 3:53 am

Nice! Thank you!
ferrante
 
Posts: 12
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 16 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved