I have table:
id | cat_id | name
1 | 1 | aaa
2 | 1 | bbb
3 | 2 | ccc
4 | 3 | ddd
5 | 2 | eee
6 | 1 | fff
I can go to site.com/table/edit/id/1
and show me input
name (id 1) [ aaa ] (i hide other field)
and I can edit id 1. how can I make something:
site.com/table/edit/cat_id/1
and show me:
name (id1) [ aaa ]
name (id2) [ bbb ]
name (id6) [ fff ]
and i can edit them, and save. How to do this?
You’re not going to achieve this with the default generated forms. But it’s quite easy to create your own form (just extends from
sfFormand implement thesetup()function). Then add your own logic in thesave()function.Pseudo-code:
EDIT: Hmm… i think you could also create one form, and add all the edit forms as subforms.