Hi,
if I upload an image with the file field, then the image name is stored in the database but the file is not loaded on the server as it automatically works with the CF action.
"Upload to server" is activated.
What do I have to do in CC6?
F.
Untick upload to server and use the action instead
this, not works:
File Field
Tab general:
Name: fotoupload
Name: Fund[photo]
ID: fotoupload
Tab events:
no empty
Function
{fn:upload56}
under Functions
upload file-Function
name: upload56
F.
So the file upload function UPLOADS the file that the user has sent. So it goes in the submit event.
I must have also in CC6 a Event "submit" under the tab Events?
Of course. Doesn't need to be called that but yes. You submit the form to the event, which is where the file is actually uploaded.
ok,
but, the form (with file field) is in the Event:
save_new_beob
and in this i have the function:
{fn:upload_foto}
also the form: beob_new_form
with the file field
have the submit event: save_new_beob
If I put a save data action and a text field in the SAME event, it won't work because the text field hasn't been filled in yet. Same 5hing as with the file field. You can't put the file upload action the the same event as the file upload field, because you haven't selected the file yet.
put the file upload function in the event that that form submits to
yes, i have...under the Event: save_new_beob
{fn:upload_foto} <- save not data of server
{fn:save_beob_new} <- save dataname in database (its work correct)
and the form (name: beob_new_form) with files field have a submit event: save_new_beob
:-)
Problem solved.
actived upload to Server in file field and the function in Events.