Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Uploadify (how to implement a custom action)

Go to End

2 Posts   1111 Views


Community Member, 6 Posts

9 September 2011 at 3:49am

Anyone, please point me in a right direction.

I want to add a new tab to ImageUploadField, and to place there a field to enter a timecode, and button to get preview from FLV attached via FileUploadField above, as shown in the image:

I've extended ImageUploadField and set a new template for it, with code for butrton as:

<button type="submit" class="{'url' : '$Link(extract)'}">Extract from video</button>

But where (in which class) to place a "function extract(...)" and why Firebug console shows corresponding request as
i.e. without /extract chunk after "DetailForm"?

Thank you in advance, and sorry for not so good English...


Forum Moderator, 4102 Posts

10 September 2011 at 1:37am

I assume you have created a subclass of ImageUploadField? The function can go in there. Form fields are actually controllers. Just don't forget to add the "extract" action to your allowed_actions, too.

SilverStripe tips, tutorials, screencasts and more: