on the product insert / update pages, you would need to use the Data Assist manage relational table behavior.
you would create a recordset to return the available options.
add a checkbox to the page. Set the value of the cehckbox to use the optionID column from the option recordset, set the label for the check box to use the option name.
Now add a repeat region around the check box so it will loop through the option recordset to show all options.
*1- If this is the update page we need to create a binding in Dreamweaver before proceeding. Open the results page for the products table in the web browser, click on the update button for any product to open the update page, notice the address in the browser has a querystring variable, it will look something like this:
update?productID=3
Copy the name of the Querysting variable, in my example above it is "productID", then go to the bindings panel in Dreamweaver, click the plus button and select URL Variable, and paste the name that was copied from the browser. This will create a new databinding for the Query String variable used to load the product into the update page*
*-2 For the insert page, we need to find the name of the session that will be created when the product is inserted, go to the Server behaviors panel and double click the insert record behavior. In the session variable section, make note of the Save As setting, this is the name of the session that will be created.
cancel out of the insert record behavior, and go to the bindings tab, expand the session collection and make sure a session binding with the name from the save as setting in the insert record behavior exists*
Next add the Manage Relational Table behavior.
On the first step, set the relational table to be the productsoptions table
On the Second Step, the "Main table Join" column is the productD column, set the data type to numeric.
- On the Insert page, click the lightning bolt next to Key value and select the Session variable that is created by the insert record behavior (refer to *-2 above)
- On the update page click the lightning bolt next to Key value and select the URL Variable used to populate the update page (refer to *-1 above)
On the Third step, set the foreign key column to the OptionID, for Options From Field, select the Repeating checkbox. on the forth step, you can review the settings and click finish