displaying labels for groups

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

displaying labels for groups

Postby ststoddard » Thu Mar 20, 2008 2:41 pm

Hi Steve,

Thanks for the latest version. I have not hesitated to put it to work, as I am currently working on an overall upgrade of my application. Lots of interesting things to explore! And since you made it available, I'll do my part to bring up any issues I come across…

To start, in using the new version (1.0 b 1), I find that fields in my tables that are in groups behave oddly. I love the fact that fields now display inline when they are part of a group, and have long wanted this feature. However, none of the labels of individual fields, nor descriptions, nor the name of the group display. I just get boxes arrayed across the page. ??? Anything special that I need to do?

Thanks again.
S. T. Stoddard
ststoddard
 
Posts: 56
Joined: Mon Nov 05, 2007 4:10 pm
Location: Davis, CA

Postby shannah » Thu Mar 20, 2008 5:41 pm

I'm not sure why you're observing this behavior. In fact groups should still be displayed in a vertical fashion.

Can provide some more details about the fields that are being laid out weird? E.g. fields.ini file defs.

Best regards

Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ststoddard » Thu Mar 20, 2008 8:18 pm

Ok, so not only do labels not display and everything is inline, I get this error:

Fatal error: Call to undefined method HTML_QuickForm_header::getElements() in /var/www/private/xataface-1.0-beta-01/Dataface/FormTool.php on line 678


for a table that I set up using the old version (0.71) that has a bunch of groups in it. These groups show up in the view record area, but I can't even edit the form if I leave them in the fields.ini. If I knock them out, then the edit form comes up fine.

Here is the fields.ini file:


;__sql__ = "select t.*,s.location_code from House_status as t, House_survey as s where t.sid = s.sid"

[location_code]
widget:label = House
;order = 0

[sid]
widget:type = hidden
title = 1

[owner]
widget:label = Dueno
validators:regex = "/[A-Za-z -']/"
widget:focus = 1

[phone]
widget:label = Telefono
widget:type = checkbox

[fieldgroup:Area]


[dim1]
group = Area
label = Ancho
validators:regex = "/[0-9]*/"
widget:atts:size = 3

[dim2]
group = Area
label = Largo
validators:regex = "/[0-9]*/"
widget:atts:size = 3

[dim3]
group = Area
label = Otro
widget:description = "Entrar adicionales medidos si hay. Separa con coma si hay mas que uno"
widget:atts:size = 6
validators:regex = "/[0-9, ]*/"

[owner_estimate]
;group = Area
widget:label = Estimado del dueno?
widget:type = checkbox

[rented]
widget:label = Alquilado
widget:type = checkbox

[rooms]
;group = Cuartos
widget:label = Numero
validators:regex = "/[0-9]*/"
widget:atts:size = 2

[rooms_surveyed]
;group = Cuartos
widget:label = Encuestados
validators:regex = "/[0-9]*/"
widget:atts:size = 2

[rooms_screened]
;group = Cuartos
widget:label = Con tela metalica
validators:regex = "/[0-9]*/"
widget:atts:size = 2

[roof]
widget:label = Techo
widget:type = checkbox
vocabulary = roofs


[kitchen]
widget:label = Cocina
widget:type = checkbox
vocabulary = kitchens

[construction]
widget:label = Construccion
widget:type = checkbox
vocabulary = constructions

[electricity]
widget:type = checkbox
widget:label = Electricidad

[water_source]
widget:label = Fuente de agua
widget:type = checkbox
vocabulary = water_sources

[supply_freq]
widget:label = Cada cuanto llega agua?
widget:type = select
Default = DAILY
vocabulary = water_freq

[water_source_alt]
widget:label = Otras fuentes de agua
widget:type = checkbox
vocabulary = alt_sources

[gather_freq]
widget:label = Cada cuanto?
widget:type = select
vocabulary = water_freq

[store]
widget:type = checkbox
widget:label = Almacena?

[animals]
widget:label = Animales
widget:type = checkbox
vocabulary = animals

[sewage]
widget:label = Desague
widget:type = checkbox
vocabulary = sewages


[insecticide]
;group = Insecticida
widget:label = Que usa?

[insecticide_freq]
;group = Insecticida
widget:label = Cada cuanto?
widget:type = select
vocabulary = insect_freq

[last_treatment]
;group = Insecticida
widget:label = Hace cuanto?
widget:type = select
vocabulary = last_treatment

[fumigate_day]
;group = Ministerio
widget:label = Dia
widget:atts:size = 2
widget:description = Ultima fumigacion
widget:atts:onkeypress="nextField(this,'fumigate_month')"


[fumigate_month]
widget:label = Mes
;group = Ministerio
widget:atts:size = 2
widget:atts:onkeypress="nextField(this,'fumigate_year')"

[fumigate_year]
widget:label = Ano
;group = Ministerio
widget:atts:size = 2
widget:atts:onkeypress="nextField(this,'abate_day')"


[abate_day]
widget:label = Dia
;group = Ministerio
widget:atts:size = 2
widget:description = Ultima abatizacion
widget:atts:onkeypress="nextField(this,'abate_month')"

[abate_month]
widget:label = Mes
;group = Ministerio
widget:atts:size = 2
widget:atts:onkeypress="nextField(this,'abate_year')"


[abate_year]
widget:label = Ano
;group = Ministerio
widget:atts:size = 2
widget:atts:onkeypress="nextField(this,'comment')"


[review]
;group = Validacion
widget:label = Revisar ficha?
widget:description = "Indicar si la ficha necesita revision por alguna razon"
widget:type = checkbox

[comment]
;;group = Validacion
widget:type=portal
widget:label = Comentarios
relationship = moradores



When I moved to 1.0 beta, I just pointed the index.php file to the new version.

??? Let me know what else would help diagnose the problem.
S. T. Stoddard
ststoddard
 
Posts: 56
Joined: Mon Nov 05, 2007 4:10 pm
Location: Davis, CA

Postby shannah » Thu Mar 20, 2008 8:30 pm

Try clearing out your application's templates_c directory and see if it is still doing it.

If the problem persists then I'm confused...
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ststoddard » Fri Mar 21, 2008 8:02 am

You're confused, then. :wink:

I did remove everything in templates_c. No effect.

I even tried recreating a whole new dataface instance for my database. Started from scratch, just copied over my table configuration files. Problem persists.


:(
S. T. Stoddard
ststoddard
 
Posts: 56
Joined: Mon Nov 05, 2007 4:10 pm
Location: Davis, CA

Postby shannah » Fri Mar 21, 2008 8:07 am

I can't reproduce this problem. Any chance you can give me temporary FTP access to look at your setup - or can you send me the code/db schema to try out.


I have been running this version on both PHP 4 and PHP 5 for some time now, and most of them make use of groups - and I don't see this behavior.

If you can send a screenshot, that might help to rule out any misunderstandings too.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Mar 28, 2008 6:14 pm

I posted a patch at http://bugs.weblite.ca/view.php?id=115 that should fix the issue.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ststoddard » Mon Mar 31, 2008 4:14 pm

That does appear to fix the issue. Thanks.

Now, is displaying the fields in a group 'in-line' truly an option now? If so, how does one implement it?

Cheers.
S. T. Stoddard
ststoddard
 
Posts: 56
Joined: Mon Nov 05, 2007 4:10 pm
Location: Davis, CA

Postby shannah » Mon Mar 31, 2008 9:02 pm

Displaying fields inline still isn't really a feature. However the sub fields of a 'group' widget can be displayed inline by changing the widget:separator value.

e.g.

Code: Select all

[address]
    widget:type=group
    widget:separator=" "

[address:street]

[address:city]

etc...


I am slowly working up to more and more flexibility with form layout. The inline display feature won't be difficult to add for the next minor release (1.1).

I am also aiming toward making it easy to define your own form layouts with HTML so that you have complete control over the look.

Best regards

Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ststoddard » Tue Apr 01, 2008 1:35 pm

Curious, seems that fields sometimes already display inline…

So I have a fieldgroup set up. If I look at the edit form, fields are arrayed in a column one over the other per the norm. However, if I go in via parent records to the edit related form, they display in-line and the fieldgroup label is missing. Also, whereas in the regular edit form the fields group together at the top of the form, in the edit related record form they fall into position according to what I have specified for order in the fields.ini file.
S. T. Stoddard
ststoddard
 
Posts: 56
Joined: Mon Nov 05, 2007 4:10 pm
Location: Davis, CA

Postby shannah » Tue Apr 08, 2008 7:58 am

I have added this to the issue tracker
http://bugs.weblite.ca/view.php?id=128
shannah
 
Posts: 4457
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