Using data from an event to generate printable form


I would really like the Community’s input on how to tackle a specific task I need to complete with Scheduler.

In short, I want a print-optimized HTML/PDF-template to be populated with data from a single event in the Scheduler. Ideally, a button with the text “Print” is displayed within the event-window which, when pressed, will pop-up a new window containing the populated template.

I should mention that there will be a couple of custom fields for the events: name, address, phone#, and so forth.

Never having worked with Scheduler, or anything like it, before, I would appreciate any input and assistance you could provide.


Ideally, a button with the text “Print” is displayed within the event-window

Can be done by creation custom form section, or adding button to the existing section … ion_header

I should mention that there will be a couple of custom fields for the events
When lightbox is opened, you can access ID of currently active event as

so you can send this ID as parameter to popup and extract additional fields from DB , based on that ID


you can add any number of custom fields to the scheduler - just mention them inside render_table command. On client side all of them will be available as


Thank you for your prompt response.

What I didn’t mention in my last post is that I’m using the Joomla version of Scheduler (full package 2.2) and I’m having a hard time figuring out which files to edit.

First of all, I envision the code for the custom button and the function its calling looking something like this:

{name:"description", height:130, map_to:"text", type:"textarea" , focus:true, button:"print"}


scheduler.locale.labels.button_print="Print Me!";
scheduler.form_blocks.textarea.button_click=function(index, src, sec, data){
             // active event's id
             var id = scheduler._lightbox_id;

             // collect data from event in question
             var first_name = scheduler.getEvent(id).first_name;
             var last_name = scheduler.getEvent(id).last_name;
             var phone = scheduler.getEvent(id;).phone;
             // ... and so forth

             // code to send data to receiving script goes here
             // e.g. Ajax-call to my "pop-up print-script"

Adding the custom fields is a breeze with the new Scheduler-admin gui in Joomla, but I haven’t the slightest idea where to put this code.

Oh and by the way, how would you send the data to my html-print generator? I was thinking about using Ajax and pushing the data as POST, but I don’t know. I wouldn’t want anyone calling my script from outside Joomla.

Thanks again!

Its a bit complicated in case of Joomla plugin.
The configuration of lightbox is created dynamically, so there is no way to simple add some code to have a custom button on the form.

As one of possible workarounds, you can add the code to the

locate there

$fieldsString .= '{name:"time", height:72, type:"time", map_to:"auto"}';

and add button parameter to it

As for custom js code - you can add it to the end of dhtmlxscheduler.js