Selection dependent Checkbox group
Hi there, I wonder if anyone can offer some advice?
I'm working on a CMS for a client who sell accessories for various audio/visual products. My intial struggle is trying to work out the best way for constructing the insert/update pages for these accessories as they're a little more complex than I've created before. Essentially their products fall into one of a number of Categories (Mobile, Audio, Gaming, etc), and then into any number of Devices in that Category. For example, Product A falls into Category 'Mobile' and available for Devices iPhone 5, Samsung Galaxy S3 and Samsung Galaxy S2 while Product B falls into Category 'Gaming' and then Devices 'Nintendo DS', 'Nintendo 3DS' and 'PSVita'.
I'll create a table in the database named 'Category' which will simply have a 'category_id' and 'category_name' and a second named 'Device' which will have 'device_id', 'device_name' and 'category_id'. I have no issues creating the Insert/Update pages to administer these two tables. There will then be a table named 'Product', but in the Insert/Update forms for administering this table, as well as providing a name, code, image upload among other elements they will need to select an appropriate Category and then select any number of Devices related to that Category. Ideally what I would like to happen is when they select a Category from a list on the Insert page it will then present all the appropriate Devices for just that Category as a series of checkboxes from which they can select any number of them. Then when they go to the Update page for a product it is already displaying the correct Category and correct series of Device checkboxes for that Category. A concern is that the list of Devices for each Category is going to be dynamic as the client will be able to add and delete Devices from the list via another form.
I would be very grateful for any advice on how I may best achieve this? Plus in terms of recording the appropriate Devices for each product, should this be achieved through Manage Relational Tables?
Many thanks in advance