srs81 / CakePHP-AjaxMultiUpload

CakePHP 2 plugin to allow for easy multi-file upload with AJAX
Other
65 stars 32 forks source link

integrate into existing form #3

Closed naii closed 12 years ago

naii commented 12 years ago

Hey there,

just wanted use your plugin but had no success when adding the upload into the form.

You say to add this to the edit view: "echo $this->Upload->edit('Company', $this->Form->fields['Company.id']); "

How to add the upload function when I have an existing form? I'm asking because the error message I get refers to this line in "add.ctp" saying:

"<?php echo $this->Form->create('Model name');?>"

Is there a known issue?

Regards!

srs81 commented 12 years ago

The Upload helper (for the this->Upload) comes from this line:

var $helpers = array('AjaxMultiUpload.Upload');

Have you added that to the controllers that you are trying to use this plugin in?

Also, if the error is in the Form->create() ... do you think it might be a problem with the model name?

srs81 commented 12 years ago

I think the problem might be due to missing one of the steps. I'll close this issue, please let me know if you find something else.