Customizing label in one-to-many form
Archived from the Xataface Users forum.
indra — Sun Apr 16, 2006 12:29 pm
Hi Shannah, this is a great framework!
thank you for you have put in this project.
I have 2 question:
- How do you customize label, description and widget in one-to-many form?
I have 2 tables, which are customers and orders, and I use customers as source and orders as destination.
I’ve tried put some data in /path/to/site/tables/customers/fields.ini without any success.
…
[Status]
widget:type = select
vocabulary = Status
[Orderdate]
widget:type = calendar
…
Status and Orderdata are the fields of Orders
- I have an error in one-to-many form;
Found 2 Records in relationship Orders
Notice: Array to string conversion in /var/www/htdocs/df/Dataface/Error.php on line 61
my orders tables consist:
CREATE TABLE orders (
OrderID int(11) NOT NULL auto_increment,
CustomerID int(11) default NULL,
Description text,
Price varchar(10) default NULL,
Status varchar(10) default NULL,
Orderdate timestamp(14) NOT NULL,
PRIMARY KEY (OrderID)
) TYPE=MyISAM;
Thank you for your help,
Indra
shannah — Sun Apr 16, 2006 2:01 pm
Hi Indra,
Thanks for taking the time to try out Dataface. In response to your first question about labels in a one-to-many relationship, first note that field descriptions are handled independent of relationships. That means that you will have a fields.ini file for each table, and the field configurations appear in their respective fields.ini file.
For example, fields in the orders table can be configured in the /path/to/site/tables/orders/fields.ini and the fields in the customers table appear in the /path/to/site/tables/customers/fields.ini file.
As far as the error goes, can you describe a little bit of the context surrounding it. i.e., when does it occur?
indra — Mon Apr 17, 2006 12:35 am
Hi Shannah,
I did what you’ve told me with the same result,
The orders form has changed to what I describe in /path/to/site/tables/orders/fields,ini, but not with the orders form in one-to-many relationship in customer forms.
for the second error,
when I open customers form and then click on orders tab (one-to-many) the erros showed up,
Notice: Array to string conversion in /var/www/htdocs/df/Dataface/Error.php on line 61
shannah — Mon Apr 17, 2006 8:28 am
Hi Indra,
It sounds like you probably have a value in the fields.ini file with a comma where it is not quoted.
e.g.:
widget:description = Hello, world
The above will give an error, because it will be loaded as an array: (Hello, world)
The correct way would be:
widget:description = “Hello, world”
It this is not the problem, please post your fields.ini file for the orders table and the table defintion and I can take a closer look.
Best regards
Steve