Add minuts to start_time ?? // Save data block in DB

Good night people. I have 2 problems with my project.

  1. I am trying to make the lightbox show the duration of an event based on radio button selected or not. Example: if I select “Double” the event duration is 90 minutes, but if I select “Single” the duration is 45 minutes. How I can do this?
  2. I have created a block to enter 4 e-mail but I can not do to save as each of those 4 textinput separately in each field of the database. This is the code I use but do not understand where the error is.

scheduler.form_blocks[“my_editor”]={
render:function(sns){
return “

Jugador 1: 
Jugador 2: 
Jugador 3: 
Jugador 4: 
“;
},
set_value:function(node,value,ev){
node.childNodes[1].value=value||””;
node.childNodes[4].value=ev.details||"";
},
get_value:function(node,ev){
ev.location = node.childNodes[4].value;
return node.childNodes[1].value;
},
focus:function(node){
var a=node.childNodes[1]; a.select(); a.focus();
}
}

scheduler.config.lightbox.sections=[

			{name:"description", height:80, map_to:"text", type:"textarea" , focus:true},

			{name:"nuevo", height:23, type:"select", options:sections, map_to:"cancha" },

                            {name:"selectme", height: 50, options:tipo_juego, map_to:"tipo_juego", type:"radio", default_value: "2", vertical: true, onchange:cant_minutos } ,

                            {name: "jugadores", height: 200, type:"my_editor", map_to: "details" },

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

			{name:"time", height:72, type:"time", map_to:"auto"},

                    				];

From already thank you very much to whoever can help me!
Regards,

Daniel
(sorry my english, i´m from Argentina and here we talk spanish).

Hello,

You can use checkbox section and pass your handler function to the “handler” section option. In that function you can get current set time, set new one, etc.

So what are you trying to do here? How those 4 fields should be saved in the event object?
ev.email1, ev.email2?
ev.location = node.childNodes[4].value;
here you saving value from 1 input to “location” field.

Kind regards,
Ilya

Thanks for your response Ilya.

  1. Can give me a little sample how to do this ?

  2. in DB field “details” i would to save email1, email2, email3 and email4. Not only the first value. I don’t understand how to do this.

Thanks again !!!