Edit Forms and Image Upload |
[eluser]Unknown[/eluser]
I initially have a form with a couple of text inputs, a textarea, and an image upload. I can save all this to a database and upload the image. When I edit the form I populate the text inputs and textarea with the values from the database, but I have to choose the image again. Is there a way to set the value for the uploaded image so I don't have to choose the image again?
[eluser]danmontgomery[/eluser]
Nope. If you set the value of the upload input the file will just be uploaded again. Best to check if an uploaded file exists or not.
[eluser]Unknown[/eluser]
How would I check if the image is uploaded? How could I make it use the current value, so that when I hit save, the image value isn't empty?
[eluser]umefarooq[/eluser]
hi if you are using form validation for your form you can use this validation for your upload filed validation http://devbro.com/testing/ci_form_validation/ |
Welcome Guest, Not a member yet? Register Sign In |