Thanks Stanislav,
In response to this question on lightbox Now in the lightbox i want to list 7 days of week and each of the days will have a combo box or a drop down box allowing the user to select a particular schedule for that day which is retrieved from the database.At the bottom of the lightbox there is date selection for start date and end date.If i double click on Wednesday the start date and end date will show the date on wednesday which is what we want ,is it possible to show only wednesday on the lightbox with the combo box allowing the user to select the schedule for that day and like wise if he selects for a date range from monday to Friday the user should be able to see all the days of the week with their respective dropdown boxes allowing the user to select the schedule for that day.Please let me know
You sent me a link in response to custom form block events.That link did not help me much as i tried what was mentioned there Here is what my code looks like
function init() {
scheduler.config.xml_date=“%Y-%m-%d %H:%i”;
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=true;
scheduler.init(‘scheduler_here’,null,“month”);
scheduler.locale.labels.section_type = “Monday”;
scheduler.locale.labels.section_type1 = “Tuesday”;
scheduler.locale.labels.section_type2 = “Wednesday”;
scheduler.locale.labels.section_type3 = “Thursday”;
scheduler.locale.labels.section_type4 = “Friday”;
scheduler.locale.labels.section_type5 = “Saturday”;
scheduler.locale.labels.section_type6 = “Sunday”;
scheduler.attachEvent(“onBeforeLightbox”,function(id){
scheduler.load(“scheduler/lightbox”);
return true;
});
scheduler.config.lightbox.sections = [
{name:“description”, height:200, map_to:“text”, type:“textarea” , focus:true},
{name:“type”, height:21, map_to:“NAME”, type:“select”, options:[scheduler.serverList(“NAME”)]},
{name:“type1”, height:21, map_to:“NAME”, type:“select”, options:[scheduler.serverList(“NAME”)]},
{name:“type2”, height:21, map_to:“NAME”, type:“select”, options:[scheduler.serverList(“NAME”)]},
{name:“type3”, height:21, map_to:“NAME”, type:“select”, options:[scheduler.serverList(“NAME”)]},
{name:“type4”, height:21, map_to:“NAME”, type:“select”, options:[scheduler.serverList(“NAME”)]},
{name:“type5”, height:21, map_to:“NAME”, type:“select”, options:[scheduler.serverList(“NAME”)]},
{name:“type6”, height:21, map_to:“NAME”, type:“select”, options:[scheduler.serverList(“NAME”)]},
{name:“time”, height:72, type:“time”, map_to:“auto”}
];
scheduler.attachEvent(“onEventSave”,function(id){
return true;
});
}
My light box connector looks like this
protected void configure() {
Connection conn= ( new DataBaseConnection()).getConnection();
SchedulerConnector c = new SchedulerConnector(conn,DBType.MSSQL);
OptionsConnector list = new OptionsConnector(conn,DBType.MSSQL);
list.render_table(“TABLE_TEMPLATES_LIST”,“TEMPLATE_ID”,“TEMPLATE_ID(value),name(label)”);
c.set_options(“NAME”, list);
c.render_table(“TABLE_TEMPLATES_LIST”,“TEMPLATE_ID”,“USERID,NAME,DESCRIPTION,IsGlobal”,“”,“”);
}
The query that is executed
DB query
SELECT TEMPLATE_ID,TEMPLATE_ID as value,name as label FROM TABLE_TEMPLATES_LIST
Done in : 140ms
Below is the screenshot of the data in the table.The labels should be populated in the dropdown boxes and key values should contain the values of ID.
First .
Why am i not getting the values populated in the dropdown boxes?
In the lightbox.js i did not find a function where onselectdate() can be used to hide elements in the lightbox .On a selecting a date i should be able to hide and show the combo boxes
Your sample code to hide elements in the custom form blocks is not clear i did try that .Can you please explain if this is the above code what modifications do i need to do here
Secondly
Assuming you will be answer the above question what methods do i have to get the values from the combo boxes to insert the values in the database ? please give a sample code with dropdown box or combo box as a example
Thirdly
If the event shows up in the scheduler interface and i click on that i would like to show that details of the schedule again with the combo boxes .For eg lets say the schedule is for thursday and Friday and when i do a double click on the event it should bring the lightbox with the combo boxes for thursday and friday ONLY with the appropriate scheudule selected and the date as well.
Also The sceduler generates a eventid is this unique? the reason i am asking is it should NOT generate a duplicate value as we are inserting this in the DB and it should not clash with the other events if it matches the event id
Please let me know the answers for all the above questions
Thank you in advance