Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

has_one file relation not working on front end forms #9

Open
codivist opened this issue Apr 22, 2011 · 2 comments
Open

has_one file relation not working on front end forms #9

codivist opened this issue Apr 22, 2011 · 2 comments

Comments

@codivist
Copy link

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 = [email protected]
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.

@codivist
Copy link
Author

I guess I should mention that because of the above, it makes it so the uploaded file can NOT be attached to emails.

@codivist
Copy link
Author

upon further investigation I have found that the uploadify form doesn't work when the form is submitted via ajax, and your site MUST be in LIVE mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant