Welcome Guest, Not a member yet? Register   Sign In
Uploading files - extra input
#1

[eluser]Kemik[/eluser]
Hello,

Say I want to add a description to a file can I just create an extra input box in the same form as the upload box (view file) then add the validation code in the controller above the $this->upload->do_upload($field_name) code?

Thanks.
#2

[eluser]Sarfaraz Momin[/eluser]
You can do that. The file upload does work as normal post along with all the other fields in the form.
#3

[eluser]Kemik[/eluser]
Thanks.

Instead of creating a new thread I'll just continue this one. I'm creating a script where the user can create groups. The page I'm working on lets the user upload a photo for the different groups. I have a main page with the list of groups and an upload photo button. I was going to make the link on the upload photo button be uploadurl/$group_id but the upload library rewrites the url when it submits the upload form so I cannot use the uri to submit the group_id.

Can anyone think of a better way to push the group_id from the group list to the upload photo page? I'm leaning towards flash data but there's no way to set it from just clicking the hyperlink.
#4

[eluser]Avatar[/eluser]
whats wrong with making the upload photo button into a button inside a form along side a hidden form field holding your groupid?




Theme © iAndrew 2016 - Forum software by © MyBB