How to make dataprocessor to work with multiselect? Is it possible? I have loaded options in multiselect, but unable to load selected values.
I have many-to-many relation table, with two fields as primary key. In other words - “Item” have a “Category” or few.
> var categoryForm = categoryWin.attachForm(
> [{
> type:"multiselect",
> connector: "data/tests.categories.php",//-this working fine
> name: "category",
> }]
> ...
> var dp3 = new dataProcessor("data/tests.category.form.php?id="+myForm.getItemValue('id'))
> dp3.init(categoryForm);
> ...
> This loads one selected value, when there are definitely two must be:
> //categoryForm.load("data/tests.category.form.php?id="+myForm.getItemValue('id'));
> ...
> PHP file:
> <?php
> require_once('../dx/connector/form_connector.php');
> require_once 'common.inc.php';
> $form = new FormConnector($conn);
> $form->render_table("tests_category","test","category");
> ...
> MySql:
> CREATE TABLE `tests_category` (
> `test` int(11) NOT NULL,
> `category` int(11) NOT NULL
> ) ENGINE=InnoDB DEFAULT CHARSET=cp1251;
> ALTER TABLE `tests_category`
> ADD PRIMARY KEY (`test`,`category`);