Mikelon85
Mikelon85

Reputation: 432

How can add new field to an event with dhtmlx scheduler?

I want to add new fields or propierties to an calendar event. How can I do it?

Thanks!

Upvotes: 1

Views: 4634

Answers (3)

SalindaKrish
SalindaKrish

Reputation: 149

What do you mean by calendar event?

Is it adding a new event?, then it must be done using lightbox(built-in option)

 scheduler.config.lightbox.sections=[
            { name:"description", height:50, map_to:"text", type:"textarea", focus:true },
            { name:"location", height:43, map_to:"event_location", type:"textarea",
                default_value:"Blackheath Avenue London,Greenwich,Greater London SE10 8XJ,UK"},
            {name:"recurring", height:115, type:"recurring", map_to:"rec_type",
                button:"recurring"},
            { name:"time", height:72, type:"time", map_to:"auto"}
        ];

each tag used in here is suppoted by the plugin,,,,in you want to have a seperate customize lightbox go to

http://docs.dhtmlx.com/scheduler/custom_details_form.html

This is the preview

Upvotes: 0

squivo
squivo

Reputation: 21

This is how you would create a simple href link inside an event:

1) Go to the Event Configuration Console and create a custom field, under the section that says 'CUSTOM FIELD'. Give the field a name. In this example, call it 'url'. Select its type as 'TextArea'.

2) Create another custom field, call it 'link_title'.Also a 'TextArea'. Description is optional.

SAVE

3) Go to the 'Templates' section of the event console. Under the first section (... scheduler.templates.event_text=function(start,end,event){... ) where you can input text, put ->

return "<b> "+event.text+"</b><br><br><a href=\"http://" + event.url + "\">" + event.link_title + "</a>";

SAVE

When you go to create your event from the main calendar, you will see extra fields. Type in them, save your event, and voila. Toot Sweet.

Upvotes: 2

Aquatic
Aquatic

Reputation: 5154

You need to

Upvotes: 2

Related Questions