SAVE as COPY button

javier94

Member
the idea is,

I have a form.. this form is a curriculum.. for a specific proces.. for example.. proces number 23

Imagine we have a new proces.. the proces_ number 19..

To avoid the user will not repeat all the curriculum if the characteristics are the same, i activated the "Save as copy button " -- with the idea the user change the number process.. and the curriculum will be ok..

in image 1 i can show you.. i have make a curriculum.. process number 2025-459-01.. and i copy the same curriculum changing the proces number as 2030-459-01... as you can see 2 registers appears

save as copy-1.PNG
this is ok..

2025-459-01 = to process 23
2030-459-01 = to process 19

i check in all the upload archives are in the gallery.. appear.. only the archives for process 23.. but i can not see the files that will belong to process 19.. that will be the same archives than process 23.. if I make a copy....

save as copy-2.PNG

and inside of 23 file.. you can find the following

save as copy-3.PNG

why if a "save as copy".. I can not see also the archives in gallery.. MAybe i forget to activate something???
 
Save as copy will copy form data, the form data is e.g. the file + path, so something like "..23/Curriculum/01-xxx/your-file" which will be the same in your copied record.
What do you expect to get?

How did you create these folders?
 
in the Curriculum.. i have 6 fileupload in a diferent repeteable group.. so for each fileupload element.. i write in upload directory something like this

/images/stories/{$my->id}-{$my->name}/{candidats_crear_curriculum___codigo_oferta}/Curriculum/01-Exp_Ambit_Public/

and is working as you can see in these folders.. if i save a register.. the register is created and the folders in the gallery too.

the trouble is ..

If i try to use the save as copy button.. the register is created... but NOT the folders in the gallery... I expect that if use the save as copy button.. and i change the process number.. i will get.. the same folders.. that i get when i save.. but with the process number changed...
 
These folders are created on upload.
After the upload the form data contains the path created during upload (it does e.g. also not change existing pathes if you change your fileupload settings and save an existing record).

So I think you have to do it yourself with a php plugin: check if your upload element contains placeholders, identify the placeholder parts in the existing file path, modifiy the path, copy the file to the new location... (which doesn't sound trivial).
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top