This the title of a helpful doc in 'Working with Images' but it only refers to image uploading whereas I want to submit a form (for a blog) with both text input and an image. I have managed to produce a method to handle this except that I got into a muddle dealing with validation using the $_POST and the $_FILES arrays.
I can vardump the $validation_str OK but when I echo the run() result - which is a boolean - it just sends me to the base url.
It seems that I have the wrong element for 'picture'. I have tried using the image temp path and the image name without success.
Can anyone give me a steer?
The Submit Upload Method
2 years ago
2 years ago
#1
2 years ago
#2
Hello,
The reason for this is because they are seperate.
Form submit
Then upload image.
Dan
The reason for this is because they are seperate.
Form submit
Then upload image.
Dan
2 years ago
#3
So what you are saying is that a form combining image and text inputs is absolutely not possible? And if so, what is the value of the 'picture' element in the validation helper rule?
2 years ago
#4
Hello,
What I am saying is the way images are uploaded.
Most anything is possible.
You just have to figure out how to do both in your submit.
You could post your controller submit method and your form view file.
And we can go from there.
Dan
What I am saying is the way images are uploaded.
Most anything is possible.
You just have to figure out how to do both in your submit.
You could post your controller submit method and your form view file.
And we can go from there.
Dan
2 years ago
#5
Many thanks Dan for responding. Actually I have now got it working - possibly rather clumsily but hey...
Here is my image validation method:
I'm sure there is a more pro way of doing it.
Here is my image validation method:
I'm sure there is a more pro way of doing it.