Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael on Oct 12, 2009 12:51
open dhtmlx forum
Scheduler Multi Select List Box

What is the easiest way to include a custom multi-select list box in scheduler form?
Answer posted by Benjamin on Oct 12, 2009 18:00
You mean Selectbox?

In the "scheduler.config.lightbox.sections" i used the following code to do that:
{ name:"art", height:21, type:"select", map_to:"art", options:[
                {key:"sprechstunde", label:"Sprechstunde"},
                {key:"eeg", label:"EEG"},
                {key:"nlg", label:"NLG"},
                {key:"uU", label:"u.U."},
                {key:"gt", label:"GT"},
                {key:"mmpi", label:"MMPI"},
                {key:"rehacom", label:"RehaCom"},
                {key:"duplex", label:"Duplex"},
                {key:"pt", label:"PT"}
            ]},

key is the value to write in the db (or xml file) and the Label is the text approachs on Screen for user...
Before init the scheduler i declared the Label for this Section via
scheduler.locale.labels.section_art = "Art der Behandlung";

The map_to - Attribute is the field name in database or xml, so it should be declared if u use events.php after tha other field in table_render-Fucntion.
Answer posted by Michael on Oct 13, 2009 07:38
Yes, but I would like to make it a multi-select instead of single select.  When I get the value I would have a javascript function to create me a comma delimited list of selected values to send to server.  Is this possible?  Just need to know how to make the select list a "multi-select" list
Answer posted by Michael on Oct 13, 2009 07:39
Basically my goal is to be able to select multiple emails address from list box in order to notify people of upcoming events.  Emails can be chosen one or many per event.