This topic is locked
[SOLVED]

Copy an entry

3/8/2024 6:55:36 PM
PHPRunner General questions
Spider Webster author

Does anyone have code that I can add to button to copy duplicate a table entry
img alt
.
img alt

D
DRCR Dev 3/8/2024

Hi

You just enable copy in the Pages menu. If you can't do that, and create your own button, use the

$record = $button->getCurrentRecord();
$assign_variable = $record['field_names']

And use the database API to insert again into the same table.

Spider Webster author 3/13/2024

HI DRCR Dev
I had used the buton code you mentioned but for some reason wouldnt work.
Used your simple solution enabling the copy button in the pages menu thankyou., ☺