I have a 3 tables. First one is the books table. Second one is the categories table. Third one is the relation table between them.
books table: record_id, category_id (categories.record_id where parent_id = 0), book_name
categories table: record_id, category_name, parent_id, group_id 1, Automotive, 0, 1 2, Motocycles, 0, 2 3, Car Maker, 1, 1 4, Fuel Types, 1, 1 5, Honda, 3, 1 6, Subaru, 3, 1 7, Gasoline, 4, 1 8, Diesel, 4, 1
relational table: record_id, book_id, category_id (categories.record_id where record_id has parent which bigger than 0)
I need to make a symfony2 form looks like
text - book_name combo - category_id (main) combo - (categories records) e.g. car maker: Honda, Subaru as combo option values (later shoud be the selection stored in relational table) combo - (categories records) e.g. fuel: gasoline, diesel as combo option values (later shoud be the selection stored in relational table)
how can I do this in symfony2 (form type(s)) syntax ?
thank you very much
Aucun commentaire:
Enregistrer un commentaire