Skip to content

has_one file relation not working on front end forms #9

@codivist

Description

@codivist

when using uploadify on a front end form, the has_one (e.g. 'Resume' => 'File') is not submitted with the form in the $data array, but the FolderID where the file is going is.

Using your example form http://www.leftandmain.com/silverstripe-tutorials/2010/08/30/using-uploadify-in-frontend-forms/ in SS 2.4.5 and the latest version of Uploadify from here, the $data array comes back as:
Debug (JobApplicationPage_Controller->sendForm() in line 198 of JobApplicationPage.php)
url = /about/jobapplicationpage/ApplyForm
FirstName = Test
LastName = test
Email = test@example.com
Position = Sales
FolderID = 189
SecurityID = 08525d6c8a71b25c02
Captcha = 7

The file is uploading and Charles returns http://newTest.localhost/about/jobapplicationpage/ApplyForm/field/Resume/refresh?FileIDs=219

The file upload is working, and javascript is returning the ID of the uploaded file, but its not being submitted to the form data on submit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions