I am new to the Scheduler and I´m trying different things at the moment. I want to dynamicaly update the Options of a select box, but I can´t get it to work.
Thanks for the reply. I was able to fix the first Problem. I´m working on the second question now. I use php. I understood, that i can use the Query-String instead of the table-name, but that doesn´t work at the Moment. I will try a bit.
Now after a little testing I found the mistake and it works now. But I have the next Problem.
The select-element in the lightbox has to be updated every time before it is opened. I tried the “onBeforeLightbox” and “onEmptyClick” event. The select-element-content is updated, but to late, the lightbox is allready open. The next time I open it, the correct values are displayed… for the last one.
Is there any way to update the select-content while the lightbox is open or to wait for the “load”-Method to finish until the lightbox opens?
My next Idea was to preload the data for the select element and store it in an array of Arrays and then use the updateCollection-Method within the onBeforeLightbox-Event like this:
If you already have some kind of logic for select reloading, just be sure that you are calling scheduler.resetLightbox() ( it will close the currently active lightbox, so you will need to use showLightbox after that )
Maybe a bit better solution would be to use formSection API, it gives you access to the HTML element of the rendered select box control in the lightbox. You can replace old options with new onew directly in the HTML