Multiple DropDown on form coming from Mysql Database Data

Hi, I try to have multiple dropdown menu on the calendar Form (lightbox), but can’t figure out how to do that… I have 2 different table in the database, one is types and one clients.
So I wanna be able to select from different table on the form… Is it possible?
tks
Seby
FilesSeby.zip (1.67 KB)

CODE HTML:

<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title></title>
html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; }
 
 
 

CODE PHP for events.php:

<?php include ('../../../codebase/connector/scheduler_connector.php'); include ('../../common/config.php'); $res=mysql_connect($server, $user, $pass); mysql_select_db($db_name); $scheduler = new schedulerConnector($res); $list = new OptionsConnector($res); $list->render_table("types","typeid","typeid(value),name(label)"); $clients = new OptionsConnector($res); //$clients->render_table("clients","id","id(value),id(label)"); $clients->render_table("clients","full_name","full_name(value),full_name(label)"); //$clients->render_table("types","typeid","typeid(value),name(label)"); $scheduler->set_options("types",$list); $scheduler->set_options("clients",$clients); //$scheduler->enable_log("log.txt",true); //$scheduler->enable_log("log.txt",true); //$scheduler = new schedulerConnector($res); $scheduler->render_table("events","event_id","start_date,end_date,event_name,details,types,subtype,clients"); ?>

All looks correctly , next

{name:"subtype", height:21, type:"select", map_to:"subtype", options:[ {key:"", label:"None"}, {key:"Wedding", label:"Wedding"}, {key:"Studio", label:"Studio"} ]},

can be replaced with

{name:"subtype", height:21, type:"select", map_to:"subtype", options:scheduler.serverList("types"},

Try to update js files with one from the next thread
viewtopic.php?f=6&t=12647&start=50

Hi Stanislav,
Well, what i’m trying to do is to have Client in a drop down from “clients” table and the type of client from another table “types” in another dropdown
So 2 Different Dropdown.
I tried that, but What I end up, is the 2 tables list in one dropdown only.
Can you help me on that please?

tks
Seby

Hi again, I have both the same data in the client drop and typ drop with the code you gave me to replace.

tks

Seby

Have you tried to update js files from the
viewtopic.php?f=6&t=12647&start=50
?

The above post contains fixed dhtmlxscheduler.js , which resolves issue with multiple dropdown loaded from the server side. ( exactly the same problem as in your case )