Send hidden data to server

Hi,

Is there any way to send data to server but not render it in the client?

Thanks.

Please provide example of such data?

I’ve a select box (external to scheduler) populated with workers, and I want to send the id of the selected worker to server with the rest of data from an event.

If the selected item changes I reload the scheduler’s data and if the user wants to add a new event, it’ll be sent with the new id of the selected item.

If I could create a new field in the event’s data but without rendering it…

I may mis-understand, but can’t you use another property of the event?

scheduler.addEvent({
		id: "ev123",
		start_date: "16-05-2009",
		end_date: "19-05-2009",
		text: "My new event. dhtmlxScheduler release",
                section_id: "THIS_IS_YOUR_STAFF_MEMBER"
	});
but can't you use another property of the event

yep, you are correct - all properties of event will be sent to the server, and can be taken there from request, or through connector’s API

Ok, but how can I create it by default for all events?

Thanks.

If you are using connector - you can set an extra field in the fields list , which will be converted to event’s property automatically.

docs.dhtmlx.com/doku.php?id=dhtm … ntegration

Yes, I’m using connector but with custom querys…

dataWrapper.attach( OperationType.Insert ,"INSERT INTO...");

I was trying to add a custom section into the lightbox with the value that I want but always hidden… the problem is that I can’t make the header hidden.

Ok, I’ve made a hidden section and now it’s working.

Thank you :slight_smile:

I met the same problem with sending extra data to server,do me a favor please.thanks a lot!

I’ve sent you a pm, but here is the answer for the rest.

The problem is solved by adding a hidden section in the lightbox. Something like this:

scheduler.form_blocks["hidden_section"] = {
			render : function(sns) {
				return "<div class='dhx_cal_ltext'></div>";
			},
			set_value : function(node, value, ev) {
				node.style.display="none"; // editor area
		        node.previousSibling.style.display="none"; //section header
		        scheduler.setLightboxSize(); //correct size of lightbox
			},
			get_value : function(node, ev) {
				return value_to send_to_DB; 
			}
		};

...

{
				name:"hidden_value",
				height:10,
				type:"hidden_section",
				map_to:"DB_VALUE"
		}