Add select field into lightbox

I just need to take info from 2 tables. But when I save it, I just save to 1. Others 2 tables are just for reading info.

I am using this file to get events from database. What do I have to write to make 2 lightbox? in init, I know what to write but not here…

Do I add the code after all of mine?
events.rar (663 Bytes)

Any js code can be used, for example you can have some custom html form on the page, and just change visibility from the show_custom_form method

Check second sample at the next page
docs.dhtmlx.com/doku.php?id=dhtm … operations

It shows how joined tables can be used for data rendering, and single table for automatic data saving.

Thanks, I didn’t see it.

Hi,

My Code Snippet

Here custom html form

1 2 3

show_custom_form method
function show_custom_form(){
document.getElementById(‘my_custom_form’).style.visibility = “visible”;
}

Is this the way to render custom form ? If not please help me.

Stanislav waiting for your reply. Got stuck with custom form rendering.Any code snippets?

Thanks in advance
Shiju

Hi Stanislav,

For a new event create
I want to show my search form in lightbox and after searching the search result must passed to default event create form.

For edit an event
On Clicking it must directly go to the default event edit form. Please help me. I have gone through the forums but i dint get help from any posts and replies.

Thanks in advance
Shiju

To simplify your task - why not to add the search form to the default scheduler’s form?
In such case you will need not have any extra forms and logic.

Rules , how custom section can be created are described here
docs.dhtmlx.com/doku.php?id=dhtm … tails_form

hi,
The search form got so many fields and also event create form will also add with some more fields. I have gone through the link but

scheduler.form_blocks[“my_editor”]={
render:function(sns){ //sns - section configuration object
return “html code of editor here”; // what this means?
},
set_value:function(node,value,ev){
//node - html object related to html defined above
//value - value defined by map_to property
//ev - event object
… code to set value to the element …
},
get_value:function(node,ev){
//node - html object related to html defined above
//event object
return “current value from editor”;
},
focus:function(node){
//node - html object related to html defined above
…code to set focus to the element…
}
}

I dont get what to do with sub functions too…

please help me the code snippet for loading custom form into lightbox after that will call the default form. I tried but its not working.

scheduler.showLightbox = function(id){
// id - id of event
… code to show any custom form …
}

… code to show any custom form …

How to render form into light box?

Hi.

I am implementing this now and I have some problems.

I choose 2 options before open calendar so I have to include them in sql query.

I want to show just one column in lightbox. Something like a name.

You will see names corresponding what you selected before.

I have added this to client side:

[code] {name:“type”, height:21, map_to:“type”, type:“select”,
options:scheduler.serverList(“type”)},

][/code]

and on server side I don’t know what to add. I have a sql query to get events on DB, but I don’t know where I have to put $scheduler->set_options(“type”, $list) and $scheduler->render_table…, before? after? I already have a render table for my events. Can I have 2? I get lightbox options from different table.

Where I have to write sql query to get just field I want?

And also, I have to put 2 lightboxes, the other one I get from DB one number. I want to display that number in different options. Something like: I got 3 then I can choose between: 1, 2 or 3

Hi,

Please have a look on this page.

viewtopic.php?f=6&t=12647&start=30

Client Side Code

{name:“operatory”, height:21, map_to:“apmt_operatory_id”, type:“select”,options:scheduler.serverList(“operatory”)},
{name:“provider”, height:21, map_to:“apmt_prov_id”, type:“select”,options:scheduler.serverList(“provider”)

Server Side Code

$scheduler = new schedulerConnector($res);
$list_operatory = new OptionsConnector($res);
$list_operatory->render_table(“facility_operatory”,“opr_id”,“opr_id(value),opr_name(label)”);
$scheduler->set_options(“operatory”, $list_operatory);

$list_provider = new OptionsConnector($res);
$list_provider->render_table(“users”,“UserID”,“UserID(value),FirstName(label)”);
$scheduler->set_options(“provider”, $list_provider);
scheduler_options.zip (49.9 KB)

I have this php file. I don’t know where I have to put that code.

After this:

$scheduler = new schedulerConnector($res); //$scheduler->enable_log("log.txt",true); $scheduler->event->attach("beforeProcessing","delete_related"); $scheduler->event->attach("afterProcessing","insert_related"); $scheduler->render_table("events_rec","event_id","start_date,end_date,text,rec_type,event_pid,event_length");

Before??
events.rar (663 Bytes)

Before “render_table” command.

Ok, it works now. Thanks.

I have some doubts yet (sorry :blush: )

Before showing calendar I choose 2 parameters. I want to show in one lightbox not all rows, just which I selected before. Like WHERE in Sql. Can I include it on the selection?

Second, I have one field called groups. It says the number of different groups existing in that row. I need not to show just the number, I need to show 2 options(option 1, option 2) if it says 2, 3 if it says 3… Is it possible?

Before showing calendar I choose 2 parameters. I want to show in one lightbox not all rows, just which I selected before. Like WHERE in Sql. Can I include it on the selection?

When forming list of options on server side, you can use render_sql command for lists and WHERE to limit them.
If you mean client side functionality, there is no built-in support for use-case, when changing one list, will change or limit values in the second list.

second, I have one field called groups. It says the number of different groups existing in that row
You can define list of options manually ( not taking it from DB ) , it can be done on both client and server side.

I need to do it on server side. I will introduce a constant wich takes values I need for WHERE.

Groups’ number is not the same always. So I need to change number of options showns all time.

It depends of one parameter you choosed before. For example if you choose one career and one course, you will have one number, but if you change career or course you will get another number (maybe the same but it has no relation)