Hi,
I’m looking a solution to get the selected text from a select in the lightbox.
I need to display this value in the event.
If someone has a solution I’m interested. In advance thank you for your suggestions
Regards,
Kri
Hi,
I’m looking a solution to get the selected text from a select in the lightbox.
I need to display this value in the event.
If someone has a solution I’m interested. In advance thank you for your suggestions
Regards,
Kri
Hi,
if you use default “select” block, you can define the event property in the map_to element:
scheduler.config.lightbox.sections=[
{name:“types”, height:21, type:“select”, map_to:“someProperty”, options:[ …]},
…
]
docs.dhtmlx.com/doku.php?id=dhtm … tails_form
Hi Alexandra,
Thank you for your answer!
I use the property for map_to link id with mySQL databases.
I need to display the selected text immediately after the registration of the lightbox in the event, without having to make an F5.
Best regards,
Kri
Hello there, is that what you’re looking for?
scheduler.attachEvent(“onEventAdded”, function(event_id,event_object){
var groups_select = document.getElementsByTagName(“select”)[0];//if your selectbox is the first one, put zero here
var id_optx=parseInt(scheduler.getEvent(event_id).id_which_your_select_map_to);
var textOriginal=scheduler.getEvent(event_id).text;
var selectedTextX="";
for (i=0;i<groups_select.length;i++){
if(parseInt(groups_select.options[i].value)==id_optx){
selectedTextX=groups_select.options[i].text;//here we catch the selected text.
}
}
scheduler.setEventText(event_id,selectedTextX+" "+textOriginal);//now you can to update the event text and including the selected option
});
let me know if this was useful(sorry my bad english), either put ‘[resolved]’ after the title when you got right the question as well.
Regards,
Jack
Hi Jack,
Thank you for your reply.
Finally I built a custom form to easily retrieve the selected text from my lists.
This works very well!
Regards,
Kri