Jump to:

7938 Posts in 1541 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Uploadify in a subclassed form – trouble...

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 573 Views
  • joelg
    Avatar
    Community Member
    129 Posts

    Uploadify in a subclassed form – trouble... Link to this post

    Hi there

    I'm trying to use Uploadify in a subclassed form. My form constructor is looking like this:

    function __construct($controller, $name) {
       
          $Uploadify = new FileUploadField('Picture', 'Some title', array (
          'buttonText' => 'Click me!'
          ));
          
          $fields = new FieldSet(
             new TextField('FirstName', 'First name'),
       new EmailField('Email', 'Email address'),
              $Uploadify
       );
          
       $actions = new FieldSet(
       new FormAction('submit', 'Submit')
       );

          parent::__construct($controller, $name, $fields, $actions);
    }

    It is also possible for me to get the Fieldholder into my template with this code:

    $dataFieldByName(Picture).FieldHolder

    However, when I try to upload I get a 404 error in charles... How can I debug this?

    Thanks for any help

    Joel

  • joelg
    Avatar
    Community Member
    129 Posts

    Re: Uploadify in a subclassed form – trouble... Link to this post

    Problem solved. The error was caused by wrong implementation of the form in the controller. Uploadify works now in my subclassed form.

    573 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.