PDA

View Full Version : When creating CMS widget, how do I access calendar event custom fields


shtkn
01-18-2011, 08:50 PM
I'm trying print out a custom event field i've added into the calendar in a PHP Execution widget for the front page. However, I can't find a way to access this data.

I've tried some simple stuff like $event[customField#] and $event['customField' . #] but no dice.

how would I access this info?

thank you for your time

shtkn
10-11-2011, 12:00 AM
okay, i had to unserialize the custom events field
$customEventFields = unserialize($event['customfields']);

after that access the specific custom field you want by name
$foo = $customEventFields['myCustomFieldName'];