1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice
  2. If you update to Joomla 3.9.16, you will have to update Fabrik from the latest GitHub version, to fix a bug introduced in Joomla, which makes it impossible to list front end folder locations in backend JForms. This affects things like template selection.
    Dismiss Notice

SAVE as COPY button

Discussion in 'Community' started by javier94, Feb 13, 2020.

  1. javier94

    javier94 Member

    Level: Community
    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???
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    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?
  3. javier94

    javier94 Member

    Level: Community
    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


    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...
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    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).
  5. javier94

    javier94 Member

    Level: Community
    ok.. thanks!!!

Share This Page