I read other posts on the subject but I was not able to make them work. I want to have options in a custom field of type “select” in the event form to be populated by a list built on the server side.
In the back-end of Joomla, in the Scheduler component, I have added a custom field of type “select”;
Name: membre
Description: membre
Type: “Select list”
In the file named " scheduler_include.html", I added this code;
Thank you for your help. I look at my code and putted it in the first list of the function getEventsRec. It did not work. Then in the file I use in “scheduler_include.html” I used an other system list username and it did not work too… this permits to limit the scope of me investigation, but still it is not working.
you should modify your connector at server side a little:
public function getEventsRec($usergroups) {
require("connector/scheduler_connector.php");
$this->scheduler = new schedulerConnector($this->connection);
$MembreList = new OptionsConnector($this->connection);
$MembreList ->render_table("ASJ273_users", "id", "username(value),username(label)");
$this->scheduler->set_options("membre", $MembreList);
if ($this->settings['settings_debug'] == 'true') {
Try to replace your code in scheduler_include.html with the follow:
<script>
scheduler.attachEvent("onXLS", function() {
for (var i = 0; i < scheduler.config.lightbox.sections.length; i++) {
if (scheduler.config.lightbox.sections[i].name === "membre")
scheduler.config.lightbox.sections[i]= {
name: "membre",
type:"select",
map_to: "membre",
options: scheduler.serverList("membre"),
focus: true
};
}
});
</script>
Make sure that your custom field name is “membre” and its type is “select”.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan