Page 1 of 1

Quick add for relationships

PostPosted: Fri Jul 08, 2011 10:37 am
by jimr451
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

Re: Quick add for relationships

PostPosted: Sat Jul 09, 2011 8:03 am
by shannah
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

Re: Quick add for relationships

PostPosted: Mon Jul 11, 2011 4:05 am
by jimr451
Ahhh - that's what I was looking for! Thanks! I love Xataface!

-Jim