This topic is locked

How to properly copy a record? 5.2

10/3/2011 5:18:44 PM
PHPRunner General questions
A
aptivus author

Hi everyone.

I am facing a strange behaviour.

For a project of mine, I am running PHPRunner 5.2 (even if I have 5.3 as well).

The project has a table "products" that is made of some varchar fields, 2 textarea fields with basic html editor, 1 textarea with NO html editor, 10 fields for image upload.

Well, if I try to copy a record so formed, I obtain an add page where the only filled in fields are the varchar and the textarea with no editor.

Why?

I want to copy all the record, with all its fields.

Is there a way to do it in events editor?

If yes, how, if I may ask?

Thank you very much for any help
Franz

Sergey Kornilov admin 10/3/2011

You would not to be able to copy image fields. Probably you can do this using BeforeAdd event. You can save copied record ID in session variable and copy image fields manually. The actual code greatly depends on the way you store your images (database or file system), images naming convention etc.