Friday, May 3, 2013

HABTM dropdown in add.ctp

Hi there,

I have 4 tables:
- childs
- peroples
- childs_peoples
- type

Between childs and parents I have a HABTM relationship, the join table is childs_parents.

In my type table there're values like "mother", "vather", "oncle" ...
On peoples i have a fk to the type table.

Now to my actual question.

In my child add.ctp i'd like to have a dropdown vather with all the vather values.
Same stuff for mother and uncle.

I just don't know how to implement this.

Right now i have just this default box where you can select multiple entires.... but this is stupid for me because a child just can have one mother.

Best regards,
Timon

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: