Quick add for relationships

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

Quick add for relationships

Postby jimr451 » Fri Jul 08, 2011 10:37 am

Hi,

I've got a relationship set up something like this:

table: Food

table: food_types

In "food_types" is a list like "fruit","vegetable","protein","pasta", etc.

So, to mark a food as two types, like "fruit", and "protein", I need to go to that tab, and add each record individually.

Is there any way to list out the options, like you would with a valuelist?

For legacy purposes, I need to keep the selected values in a separate table. Maybe there is a way to do this with valuelists and a delegate class? If someone could point me in the right direction, I'd appreciate it. Otherwise, I'll have to stick with the relationship model, which is something I could live with.

-jim
Jim Roberts
Roberts WebForge, Inc.
http://www.robertswebforge.com
jimr451
 
Posts: 20
Joined: Mon Jun 27, 2011 1:46 pm

Re: Quick add for relationships

Postby shannah » Sat Jul 09, 2011 8:03 am

Consider using a transient field with a checkbox widget in the parent table:

Code: Select all
[myrelationshipfield]
transient=1
relationship=myrelationship
widget:type=checkbox


This will add a field to your edit form where each possible related record has a checkbox that you can check.

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

Re: Quick add for relationships

Postby jimr451 » Mon Jul 11, 2011 4:05 am

Ahhh - that's what I was looking for! Thanks! I love Xataface!

-Jim
Jim Roberts
Roberts WebForge, Inc.
http://www.robertswebforge.com
jimr451
 
Posts: 20
Joined: Mon Jun 27, 2011 1:46 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 10 guests

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